From 1a36d9a013acab81307a1b7d85194d48536cf258 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Thu, 10 Oct 2024 20:46:02 +0800 Subject: [PATCH] fix(mobile): fix undefined error --- .../core/client/src/schema-component/antd/page/PagePopups.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/page/PagePopups.tsx b/packages/core/client/src/schema-component/antd/page/PagePopups.tsx index d3d0e53959..d3f1f24da0 100644 --- a/packages/core/client/src/schema-component/antd/page/PagePopups.tsx +++ b/packages/core/client/src/schema-component/antd/page/PagePopups.tsx @@ -235,7 +235,7 @@ export const PagePopups = (props: { paramsList?: PopupParams[] }) => { const waitList = popupParams.map((params) => { return ( getStoredPopupContext(params.popupuid)?.schema || - findSchemaByUid(params.popupuid, fieldSchema.root) || + findSchemaByUid(params.popupuid, fieldSchema?.root) || requestSchema(params.popupuid) ); }); @@ -248,7 +248,7 @@ export const PagePopups = (props: { paramsList?: PopupParams[] }) => { const params = popupParams[index]; if (params.puid) { - const popupSchema = findSchemaByUid(params.puid, fieldSchema.root); + const popupSchema = findSchemaByUid(params.puid, fieldSchema?.root); if (popupSchema) { savePopupSchemaToSchema(_.omit(popupSchema, 'parent'), schema); }