From ef70607290917750621dcf762b25e83a3cbe75cb Mon Sep 17 00:00:00 2001 From: Terry Sutton Date: Sun, 4 Jun 2023 23:18:09 -0230 Subject: [PATCH] Check if value is an object before returning it --- .../SidePanelEditor/RowEditor/RowEditor.utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts index ac195962610..59880facec7 100644 --- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts +++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts @@ -84,7 +84,10 @@ export const validateFields = (fields: RowField[]) => { const parseValue = (originalValue: any, format: string) => { try { - if (originalValue === null || originalValue.length === 0) { + if ( + (originalValue === null || originalValue.length === 0) && + typeof originalValue !== 'object' + ) { return originalValue } else if (typeof originalValue === 'number' || !format) { return originalValue