fix(subpage): fix the problem of invalid tab deletion (#5362)
Some checks are pending
auto-merge / push-commit (push) Waiting to run
Build Docker Image / build-and-push (push) Waiting to run
Build Pro Image / build-and-push (push) Waiting to run
deploy client docs / Build (push) Waiting to run
E2E / Build (push) Waiting to run
E2E / Core and plugins (push) Blocked by required conditions
E2E / plugin-workflow (push) Blocked by required conditions
E2E / plugin-workflow-approval (push) Blocked by required conditions
E2E / plugin-data-source-main (push) Blocked by required conditions
E2E / Comment on PR (push) Blocked by required conditions
NocoBase FrontEnd Test / frontend-test (18) (push) Waiting to run

This commit is contained in:
Zeke Zhang 2024-10-08 21:50:11 +08:00 committed by GitHub
parent f074029624
commit e3dee45ea4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -232,9 +232,13 @@ export const PagePopups = (props: { paramsList?: PopupParams[] }) => {
useEffect(() => {
const run = async () => {
const waitList = popupParams.map(
(params) => getStoredPopupContext(params.popupuid)?.schema || requestSchema(params.popupuid),
);
const waitList = popupParams.map((params) => {
return (
getStoredPopupContext(params.popupuid)?.schema ||
findSchemaByUid(params.popupuid, fieldSchema.root) ||
requestSchema(params.popupuid)
);
});
const schemas = await Promise.all(waitList);
const clonedSchemas = schemas.map((schema, index) => {
if (_.isEmpty(schema)) {