mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: update null check
This commit is contained in:
1 parent
ac9cbc6168
commit
35ee010407
3 files changed
+4
-4
No files matched your search
@@ -27,9 +27,9 @@ const ColumnList: FC<Props> = ({
|
||||
const columns =
|
||||
(filterString.length === 0
|
||||
? selectedTable.columns
|
||||
: selectedTable.columns!.filter((column: any) => column.name.includes(filterString))) ?? []
|
||||
: selectedTable.columns?.filter((column: any) => column.name.includes(filterString))) ?? []
|
||||
|
||||
const isLocked = meta.excludedSchemas.includes(selectedTable?.schema ?? '')
|
||||
const isLocked = meta.excludedSchemas.includes(selectedTable.schema ?? '')
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ const ForeignKeySelector: FC<Props> = ({
|
||||
setSelectedForeignKey({
|
||||
schema: table.schema,
|
||||
table: table.name,
|
||||
column: table.columns!.length > 0 ? table.columns![0].name : undefined,
|
||||
column: table.columns?.length ? table.columns[0].name : undefined,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ const TableGridEditor: FC<Props> = ({
|
||||
? parseSupaTable(
|
||||
{
|
||||
table: selectedTable as PostgresTable,
|
||||
columns: (selectedTable as PostgresTable).columns!,
|
||||
columns: (selectedTable as PostgresTable).columns ?? [],
|
||||
primaryKeys: (selectedTable as PostgresTable).primary_keys,
|
||||
relationships: (selectedTable as PostgresTable).relationships,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user