fix(subpage): fix the problem of invalid tab deletion (#5362)

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)) {