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 RowContextMenu

Joshen Lim693289cdb204
diff --git a/studio/components/grid/components/menu/RowContextMenu.tsx b/studio/components/grid/components/menu/RowContextMenu.tsx
index a9b19acc00c..545f534c7ad 100644
--- a/studio/components/grid/components/menu/RowContextMenu.tsx
+++ b/studio/components/grid/components/menu/RowContextMenu.tsx
@@ -21,6 +21,8 @@ const RowContextMenu: React.FC<RowContextMenuProps> = ({}) => {
const { props } = p
const { rowIdx } = props
const row = state.rows[rowIdx]
+ if (!row) return
+
const { error } = state.rowService!.delete([row])
if (error) {
if (state.onError) state.onError(error)