From f7f1bdffbbe6e4fb620b6c865f6a62c47c6a090d Mon Sep 17 00:00:00 2001 From: Junyi Date: Thu, 20 Jun 2024 21:17:10 +0800 Subject: [PATCH] fix(client): fix undefined context (#4719) --- packages/core/client/src/schema-component/hooks/useBlockSize.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/hooks/useBlockSize.ts b/packages/core/client/src/schema-component/hooks/useBlockSize.ts index d44b7d3925..6397c0cd32 100644 --- a/packages/core/client/src/schema-component/hooks/useBlockSize.ts +++ b/packages/core/client/src/schema-component/hooks/useBlockSize.ts @@ -91,7 +91,7 @@ const useTableHeight = () => { const schema = useFieldSchema(); const heightProps = tableHeightProps || blockHeightProps; const pageFullScreenHeight = useFullScreenHeight(heightProps); - const { data } = useDataBlockRequest(); + const { data } = useDataBlockRequest() ?? {}; const { name } = useCollection(); const { count, pageSize } = (data as any)?.meta || ({} as any); const hasPagination = count > pageSize;