diff --git a/moped-editor/src/views/projects/projectView/ProjectFiles.js b/moped-editor/src/views/projects/projectView/ProjectFiles.js index 5d2dadb6c3..9b145703e2 100644 --- a/moped-editor/src/views/projects/projectView/ProjectFiles.js +++ b/moped-editor/src/views/projects/projectView/ProjectFiles.js @@ -89,7 +89,7 @@ const useColumns = ({ editable: true, // validate input preProcessEditCellProps: (params) => { - const hasError = params.props.value.trim().length < 1; + const hasError = !params.props.value || params.props.value.trim().length < 1; return { ...params.props, error: hasError }; }, renderEditCell: (props) => ( @@ -103,7 +103,7 @@ const useColumns = ({ editable: true, // validate input preProcessEditCellProps: (params) => { - const hasError = params.props.value.trim().length < 1; + const hasError = !params.props.value || params.props.value.trim().length < 1; return { ...params.props, error: hasError }; }, renderCell: ({ row }) => {