[ARVADOS-WORKBENCH2] created: 2.3.0-22-g14f313ec
Git user
git at public.arvados.org
Wed Dec 1 19:27:02 UTC 2021
at 14f313ecde2b180b1ad64da83ba70e4a2e22fed2 (commit)
commit 14f313ecde2b180b1ad64da83ba70e4a2e22fed2
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Wed Dec 1 16:18:42 2021 -0300
18257: Adds checks to array values thay may be null or undefined.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/src/components/chips/chips.tsx b/src/components/chips/chips.tsx
index eb68ed7a..c4724d1b 100644
--- a/src/components/chips/chips.tsx
+++ b/src/components/chips/chips.tsx
@@ -38,7 +38,7 @@ export const Chips = withStyles(styles)(
render() {
const { values, filler } = this.props;
return <Grid container spacing={8} className={this.props.classes.root}>
- {values.map(this.renderChip)}
+ {values && values.map(this.renderChip)}
{filler && <Grid item xs>{filler}</Grid>}
</Grid>;
}
diff --git a/src/views/run-process-panel/inputs/float-array-input.tsx b/src/views/run-process-panel/inputs/float-array-input.tsx
index 780cbc90..3f0a5334 100644
--- a/src/views/run-process-panel/inputs/float-array-input.tsx
+++ b/src/views/run-process-panel/inputs/float-array-input.tsx
@@ -30,7 +30,7 @@ const validationSelector = createSelector(
);
const required = (value: string[]) =>
- value.length > 0
+ value && value.length > 0
? undefined
: ERROR_MESSAGE;
diff --git a/src/views/run-process-panel/inputs/int-array-input.tsx b/src/views/run-process-panel/inputs/int-array-input.tsx
index 03cb07ea..8077f28a 100644
--- a/src/views/run-process-panel/inputs/int-array-input.tsx
+++ b/src/views/run-process-panel/inputs/int-array-input.tsx
@@ -30,7 +30,7 @@ const validationSelector = createSelector(
);
const required = (value: string[]) =>
- value.length > 0
+ value && value.length > 0
? undefined
: ERROR_MESSAGE;
diff --git a/src/views/run-process-panel/inputs/string-array-input.tsx b/src/views/run-process-panel/inputs/string-array-input.tsx
index cabbf749..8955009a 100644
--- a/src/views/run-process-panel/inputs/string-array-input.tsx
+++ b/src/views/run-process-panel/inputs/string-array-input.tsx
@@ -31,7 +31,7 @@ const validationSelector = createSelector(
);
const required = (value: string[] = []) =>
- value.length > 0
+ value && value.length > 0
? undefined
: ERROR_MESSAGE;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list