Skip to content

Commit

Permalink
fix: Fixed deepscan issues
Browse files Browse the repository at this point in the history
Signed-off-by: Hrishav <hrishav.kumar@harness.io>
  • Loading branch information
hrishavjha committed Aug 30, 2023
1 parent c92c4b3 commit 6c0b6ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chaoscenter/web/src/components/YAMLBuilder/YAMLBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function YAMLBuilder(props: YAMLBuilderProps): React.ReactElement {
debounce((updatedYaml: string): void => {
setCurrentYaml(updatedYaml);
currentYamlRef.current = updatedYaml;
onChangeRef.current?.(!(updatedYaml === ''), updatedYaml);
onChangeRef.current?.(updatedYaml !== '', updatedYaml);
}, 500),
[onChangeRef]
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function ExperimentYamlBuilderView({ setError, setHasFaults }: ExperimentYamlBui
params: error.params ?? {}
};
});
const hasErrors = !(errors === undefined);
const hasErrors = errors !== undefined;
// if errors are there open editor in edit mode
hasErrors && setIsEditEnabled(true);
// set errors to disable navigation to visual tab and save button
Expand Down

0 comments on commit 6c0b6ce

Please sign in to comment.