From a03110bab4d92684519a8785579d677a1aa5a53a Mon Sep 17 00:00:00 2001 From: Rizky Date: Sat, 21 Oct 2023 00:05:37 +0700 Subject: [PATCH] fix --- app/web/src/base/page/all.tsx | 9 +++++++-- app/web/src/index.tsx | 2 +- undefined/lmdb/user-conf.lmdb-lock | Bin 8200 -> 8200 bytes 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/web/src/base/page/all.tsx b/app/web/src/base/page/all.tsx index 6cb6e8e5..1c838799 100644 --- a/app/web/src/base/page/all.tsx +++ b/app/web/src/base/page/all.tsx @@ -12,8 +12,13 @@ export default page({ location.pathname.startsWith("/ed/") ) { navigate("/ed/_/_"); - } else { - navigate("/editor/_/_"); + } else if (location.pathname.startsWith("/editor")) { + const arr = location.pathname.split("/"); + if (arr.length <= 2) { + navigate("/editor/_/_"); + } else if (arr.length === 3) { + navigate(location.pathname + "/"); + } } } else { navigate("/login"); diff --git a/app/web/src/index.tsx b/app/web/src/index.tsx index 15223d5d..c2ec2588 100644 --- a/app/web/src/index.tsx +++ b/app/web/src/index.tsx @@ -10,7 +10,7 @@ const start = async () => { let react = { root: null as null | ReactRoot, }; - if (true || !["localhost", "127.0.0.1"].includes(location.hostname)) { + if (!["localhost", "127.0.0.1"].includes(location.hostname)) { const sw = await registerServiceWorker(); const cacheCurrentPage = () => { diff --git a/undefined/lmdb/user-conf.lmdb-lock b/undefined/lmdb/user-conf.lmdb-lock index cfb609eb218fc2e7a6ef9dc9716d14f497983bc1..e0fb4523f479d1f0915b80be69d76149c34d3ec3 100644 GIT binary patch delta 40 mcmeBh=x~@I#%MBeVWH@MD3Iu5fPl&B&lxu^OqZW%zybh#)DZyy delta 40 kcmeBh=x~@I#%MfoVWH@MC}4nr$?DG;H!e(1W0B}hVS^xk5