wip fix
This commit is contained in:
parent
dea1b48c7f
commit
d99ddba502
|
|
@ -250,6 +250,7 @@ export const edInitSync = (p: PG) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
Y.applyUpdate(doc, decompress(res.diff), "sv_remote");
|
Y.applyUpdate(doc, decompress(res.diff), "sv_remote");
|
||||||
if (data.type === "page") {
|
if (data.type === "page") {
|
||||||
|
delete p.preview.meta_cache[data.id]
|
||||||
await treeRebuild(p, { note: "sv_remote" });
|
await treeRebuild(p, { note: "sv_remote" });
|
||||||
} else if (data.type === "comp") {
|
} else if (data.type === "comp") {
|
||||||
const updated = await updateComponentMeta(p, doc, data.id);
|
const updated = await updateComponentMeta(p, doc, data.id);
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,6 @@ const viRoute = async (p: PG) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
p.page.cur.id !== params.page_id ||
|
p.page.cur.id !== params.page_id ||
|
||||||
!p.page.cur.snapshot ||
|
!p.page.cur.snapshot ||
|
||||||
|
|
@ -237,11 +236,11 @@ const viRoute = async (p: PG) => {
|
||||||
p.page.cur = { id: params.page_id } as any;
|
p.page.cur = { id: params.page_id } as any;
|
||||||
}
|
}
|
||||||
p.status = "ready";
|
p.status = "ready";
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await reloadPage(p, params.page_id, "load-route");
|
await reloadPage(p, params.page_id, "load-route");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ const connect = (
|
||||||
url.protocol = url.protocol === "http:" ? "ws:" : "wss:";
|
url.protocol = url.protocol === "http:" ? "ws:" : "wss:";
|
||||||
|
|
||||||
const ws = new WebSocket(
|
const ws = new WebSocket(
|
||||||
`${url.protocol}//${url.hostname}${url.pathname}`
|
`${url.protocol}//${url.host}${url.pathname}`
|
||||||
);
|
);
|
||||||
|
|
||||||
ws.onopen = () => {
|
ws.onopen = () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue