Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add guard in RowEditor.utils (https://sentry.io/organizations/supabase/issues/2921318702/)

Joshen Lim11d0c9569e5b
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts
index 5440281630a..7ccad72a0d8 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/RowEditor.utils.ts
@@ -226,7 +226,7 @@ export const generateRowObjectFromFields = (
): object => {
const rowObject = {} as any
fields.forEach((field) => {
- const value = field.value.length === 0 ? null : field.value
+ const value = (field?.value ?? '').length === 0 ? null : field.value
if (field.format.includes('json') || (field.format.startsWith('_') && value)) {
if (typeof field.value === 'object') {
rowObject[field.name] = value