Fix IntInput zero or empty string parsing
[arvados.git] / src / views / run-process-panel / inputs / int-input.tsx
index 32ebeb75c27bc8ee6be8ed186b5051a5dcff0ab0..78f0d736d14b9dcf7b5bceda5956509d861677ba 100644 (file)
@@ -22,7 +22,7 @@ export const IntInput = ({ input }: IntInputProps) =>
         format={format}
         validate={getValidation(input)} />;
 
-const parse = (value: any) => parseInt(value, 10);
+const parse = (value: any) => value === '' ? '' : parseInt(value, 10);
 
 const format = (value: any) => isNaN(value) ? '' : JSON.stringify(value);