diff --git a/app/web/src/nova/ed/logic/ed-sync.tsx b/app/web/src/nova/ed/logic/ed-sync.tsx index 7c74f372..98478ce3 100644 --- a/app/web/src/nova/ed/logic/ed-sync.tsx +++ b/app/web/src/nova/ed/logic/ed-sync.tsx @@ -250,6 +250,7 @@ export const edInitSync = (p: PG) => { if (res) { Y.applyUpdate(doc, decompress(res.diff), "sv_remote"); if (data.type === "page") { + delete p.preview.meta_cache[data.id] await treeRebuild(p, { note: "sv_remote" }); } else if (data.type === "comp") { const updated = await updateComponentMeta(p, doc, data.id); diff --git a/app/web/src/nova/vi/preview.tsx b/app/web/src/nova/vi/preview.tsx index 2b24bf31..afdb4086 100644 --- a/app/web/src/nova/vi/preview.tsx +++ b/app/web/src/nova/vi/preview.tsx @@ -198,7 +198,6 @@ const viRoute = async (p: PG) => { } } } - if ( p.page.cur.id !== params.page_id || !p.page.cur.snapshot || @@ -237,11 +236,11 @@ const viRoute = async (p: PG) => { p.page.cur = { id: params.page_id } as any; } p.status = "ready"; - return; } } } + await reloadPage(p, params.page_id, "load-route"); } } diff --git a/app/web/src/utils/sync/ws-client.ts b/app/web/src/utils/sync/ws-client.ts index d4fd0a39..39008898 100644 --- a/app/web/src/utils/sync/ws-client.ts +++ b/app/web/src/utils/sync/ws-client.ts @@ -155,7 +155,7 @@ const connect = ( url.protocol = url.protocol === "http:" ? "ws:" : "wss:"; const ws = new WebSocket( - `${url.protocol}//${url.hostname}${url.pathname}` + `${url.protocol}//${url.host}${url.pathname}` ); ws.onopen = () => {