diff --git a/interface/src/components/inputs/ValidatedTextField.tsx b/interface/src/components/inputs/ValidatedTextField.tsx index 9fdcdab5d..c52fd3d09 100644 --- a/interface/src/components/inputs/ValidatedTextField.tsx +++ b/interface/src/components/inputs/ValidatedTextField.tsx @@ -16,14 +16,14 @@ const ValidatedTextField: FC = ({ fieldErrors, ...rest }) => { - const errors = fieldErrors && fieldErrors[rest.name]; - const renderErrors = () => - errors && - errors.map((e) => {e.message}); + const errors = fieldErrors?.[rest.name]; + return ( <> - {renderErrors()} + {errors?.map((e) => ( + {e.message} + ))} ); };