fix prep-page

This commit is contained in:
Rizky 2024-01-25 09:39:32 +07:00
parent 1748c55641
commit 207281726a
1 changed files with 46 additions and 44 deletions

View File

@ -51,6 +51,7 @@ export const loadCompForPage = async (ctree: IRoot, sync: SyncConnection) => {
const result = new Set<string>();
const loading = {} as Record<string, Promise<void>>;
const should_save = {} as Record<string, IItem>;
if (ctree && ctree.childs) {
for (const child of ctree.childs) {
await initLoadComp(
{ comps: mcomps, meta, mode: "page" },
@ -99,6 +100,7 @@ export const loadCompForPage = async (ctree: IRoot, sync: SyncConnection) => {
}
);
}
}
if (Object.keys(should_save).length > 0) {
for (const [comp_id, v] of Object.entries(should_save)) {