Fixes NPE in page.columns

Summary: From stack trace seems that we don't always get columns from the plugin, in which case we can't display anything

Reviewed By: lawrencelomax

Differential Revision: D33981285

fbshipit-source-id: 0d6bf2d9364f7dac93e2179e372308da51699bd3
This commit is contained in:
Michel Weststrate
2022-02-04 01:14:01 -08:00
committed by Facebook GitHub Bot
parent 6960196d8e
commit d0d0b68e0b

View File

@@ -216,7 +216,7 @@ const DataTable = React.memo(
currentStructure: Structure | null; currentStructure: Structure | null;
onRowEdited: (changes: {[key: string]: string | null}) => void; onRowEdited: (changes: {[key: string]: string | null}) => void;
}) => }) =>
page ? ( page && page.columns ? (
<Layout.Horizontal grow> <Layout.Horizontal grow>
<ManagedTable <ManagedTable
tableKey={`databases-${page.databaseId}-${page.table}`} tableKey={`databases-${page.databaseId}-${page.table}`}