From af37e266409d5f822fcc57029fca71a7b09309cd Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 14 Jun 2023 10:37:15 +0800 Subject: [PATCH] fix: enable tab and deleting tab page will result in an error (#2045) --- packages/core/client/src/schema-component/antd/page/Page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/page/Page.tsx b/packages/core/client/src/schema-component/antd/page/Page.tsx index 92613373f..96efec3bb 100644 --- a/packages/core/client/src/schema-component/antd/page/Page.tsx +++ b/packages/core/client/src/schema-component/antd/page/Page.tsx @@ -139,7 +139,7 @@ export const Page = (props) => { const [loading, setLoading] = useState(false); const [activeKey, setActiveKey] = useState(() => { // @ts-ignore - return location?.query?.tab || Object.keys(fieldSchema.properties).shift(); + return location?.query?.tab || Object.keys(fieldSchema.properties || {}).shift(); }); const [height, setHeight] = useState(0);