diff --git a/app/web/src/nova/ed/panel/main/main-history.tsx b/app/web/src/nova/ed/panel/main/main-history.tsx index 7707179b..c9931632 100644 --- a/app/web/src/nova/ed/panel/main/main-history.tsx +++ b/app/web/src/nova/ed/panel/main/main-history.tsx @@ -39,7 +39,7 @@ export const EdPageHistoryMain: FC<{}> = ({}) => { if (e) { const zip = new Uint8Array((e.content_tree as any).data); const root = JSON.parse(decoder.decode(decompress(zip))) as IRoot; - local.root = root; + local.root = JSON.parse(JSON.stringify(root)); await initLoadComp( { comps: p.comp.loaded, @@ -99,11 +99,9 @@ export const EdPageHistoryMain: FC<{}> = ({}) => { p.page.history.show = false; p.page.doc?.transact(() => { - const root = p.page.doc?.getMap("map").get("root"); - - if (root) { - syncronize(root as any, local.root); - } + const map = new Y.Map(); + syncronize(map, local.root); + p.page.doc?.getMap("map").set("root", map as any); }); await treeRebuild(p); diff --git a/app/web/src/nova/ed/panel/tree/history-list.tsx b/app/web/src/nova/ed/panel/tree/history-list.tsx index 18653a4b..61aaa43d 100644 --- a/app/web/src/nova/ed/panel/tree/history-list.tsx +++ b/app/web/src/nova/ed/panel/tree/history-list.tsx @@ -7,7 +7,6 @@ export const EdPageHistoryList = () => { const local = useLocal( { loading: true, list: [] as Awaited> }, async () => { - console.log("query list"); local.list = await queryList(p.page.cur.id); local.loading = false; local.render();