fix
This commit is contained in:
parent
70d650b4c4
commit
2e1618721f
|
|
@ -86,6 +86,8 @@ export const loadCompSnapshot = async (
|
|||
|
||||
if (res) {
|
||||
if (res.sv === res.diff && (res.sv as any) === "not-found") {
|
||||
console.warn("reload 5");
|
||||
|
||||
//location.reload();();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ export const reloadLayout = async (p: PG, layout_id: string, note: string) => {
|
|||
|
||||
if (res) {
|
||||
if (res.sv === res.diff && (res.sv as any) === "not-found") {
|
||||
console.warn("reload 1");
|
||||
//location.reload();();
|
||||
}
|
||||
|
||||
|
|
@ -185,6 +186,8 @@ export const reloadPage = async (
|
|||
|
||||
if (page.page.id !== remotePage.id) {
|
||||
alert("Page ID Mismatch!\n Refreshing to preventing data loss...");
|
||||
console.warn("reload 2");
|
||||
|
||||
//location.reload();();
|
||||
return;
|
||||
}
|
||||
|
|
@ -200,9 +203,11 @@ export const reloadPage = async (
|
|||
|
||||
if (res) {
|
||||
if (res.sv === res.diff && (res.sv as any) === "not-found") {
|
||||
console.warn("reload 3");
|
||||
|
||||
//location.reload();();
|
||||
}
|
||||
|
||||
|
||||
const diff_local = Y.encodeStateAsUpdate(
|
||||
doc as any,
|
||||
decompress(res.sv)
|
||||
|
|
@ -248,6 +253,8 @@ export const reloadPage = async (
|
|||
p.sync.code
|
||||
.action({ type: "flush-page-cache", page_id: page_id })
|
||||
.then(() => {
|
||||
console.warn("reload 4");
|
||||
|
||||
//location.reload();();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@ export const EdApiDB = ({
|
|||
|
||||
localStorage.removeItem(`schema-md-${p.site.id}`);
|
||||
_api.clear_route_cache(p.site.id);
|
||||
console.warn("reload 6");
|
||||
|
||||
//location.reload();();
|
||||
}}
|
||||
>
|
||||
|
|
@ -114,6 +116,8 @@ export const EdApiDB = ({
|
|||
|
||||
localStorage.removeItem(`schema-md-${p.site.id}`);
|
||||
_api.clear_route_cache(p.site.id);
|
||||
console.warn("reload 7");
|
||||
|
||||
//location.reload();();
|
||||
}}
|
||||
>
|
||||
|
|
@ -135,6 +139,8 @@ export const EdApiDB = ({
|
|||
render();
|
||||
alert("RESTART: OK");
|
||||
_api.clear_route_cache(p.site.id);
|
||||
console.warn("reload 8");
|
||||
|
||||
//location.reload();();
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue