From 50fe94e47be2a5dcb3a068a309984a933cc70583 Mon Sep 17 00:00:00 2001 From: Fahid Latheef Alungal Date: Sun, 16 Feb 2025 16:08:35 +0530 Subject: [PATCH] fix: fix yarn dev not working due to const variable re-assignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was causing this error ✘ [ERROR] Cannot assign to "isLoggedIn" because it is a constant src/router.js:230:2: 230 │ isLoggedIn = false ╵ ~~~~~~~~~~ The symbol "isLoggedIn" was declared a constant here: src/router.js:222:7: 222 │ const { isLoggedIn } = sessionStore() ╵ ^ --- frontend/src/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/router.js b/frontend/src/router.js index a6d02f73..742d48d4 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -219,7 +219,7 @@ let router = createRouter({ router.beforeEach(async (to, from, next) => { const { userResource } = usersStore() - const { isLoggedIn } = sessionStore() + let { isLoggedIn } = sessionStore() const { allowGuestAccess } = useSettings() try {