From 028afbe85d018a5e41bda8a36a6b55be1d786467 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 19 Oct 2025 16:23:53 +0200 Subject: [PATCH] optimized --- interface/src/components/inputs/ValidatedTextField.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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} + ))} ); };