wip fix
This commit is contained in:
parent
6ecaa36108
commit
0392922c68
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ export const EdPageHistoryList = () => {
|
|||
const local = useLocal(
|
||||
{ loading: true, list: [] as Awaited<ReturnType<typeof queryList>> },
|
||||
async () => {
|
||||
console.log("query list");
|
||||
local.list = await queryList(p.page.cur.id);
|
||||
local.loading = false;
|
||||
local.render();
|
||||
|
|
|
|||
Loading…
Reference in New Issue