Skip to content

Commit

Permalink
Filter out the empty filepaths
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrdyn committed May 9, 2023
1 parent edd212e commit 8457385
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export function ConfigureLogs() {
wizardState.customConfigurations
);

const logFilePathNotConfigured = logFilePaths.every((filepath) => !filepath);

function onBack() {
goBack();
}
Expand All @@ -52,7 +54,7 @@ export function ConfigureLogs() {
setState({
...getState(),
datasetName,
logFilePaths,
logFilePaths: logFilePaths.filter((filepath) => !!filepath),
namespace,
customConfigurations,
});
Expand Down Expand Up @@ -101,7 +103,9 @@ export function ConfigureLogs() {
color="primary"
fill
onClick={onContinue}
isDisabled={!logFilePaths?.[0] || !datasetName || !namespace}
isDisabled={
logFilePathNotConfigured || !datasetName || !namespace
}
>
{i18n.translate('xpack.observability_onboarding.steps.continue', {
defaultMessage: 'Continue',
Expand Down

0 comments on commit 8457385

Please sign in to comment.