18257: Adds checks to array values thay may be null or undefined.
[arvados-workbench2.git] / src / views / run-process-panel / inputs / string-array-input.tsx
index ce94b63cbbe9e87b1a77154f1397c18bd089448f..8955009a0d52984a9393b675e9721825f4a746d0 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { isRequiredInput, StringArrayCommandInputParameter } from 'models/workflow';
 import { Field } from 'redux-form';
 import { ERROR_MESSAGE } from 'validators/require';
@@ -31,7 +31,7 @@ const validationSelector = createSelector(
 );
 
 const required = (value: string[] = []) =>
-    value.length > 0
+    value && value.length > 0
         ? undefined
         : ERROR_MESSAGE;