fix: preloading issues caused by reference change in template (#4009)

This commit is contained in:
Mirone 2023-08-29 18:33:08 +08:00 committed by GitHub
parent 0ded20fcb7
commit 0d70d3727d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,7 +190,7 @@ export async function buildShowcaseWorkspace(
await Promise.all( await Promise.all(
data.map(async ([id, promise]) => { data.map(async ([id, promise]) => {
const { default: template } = await promise; const { default: template } = await promise;
await workspace.importPageSnapshot(template, id); await workspace.importPageSnapshot(structuredClone(template), id);
workspace.setPageMeta(id, pageMetas[id]); workspace.setPageMeta(id, pageMetas[id]);
}) })
); );