From 9b58b887b4035f55984b2137c646a4eb6e7c0599 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 13 Nov 2023 12:11:17 +0000 Subject: [PATCH] Log messages on session loading --- frontend/src/repositories/WS.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/repositories/WS.ts b/frontend/src/repositories/WS.ts index 0e582dc..44fad33 100644 --- a/frontend/src/repositories/WS.ts +++ b/frontend/src/repositories/WS.ts @@ -12,10 +12,12 @@ let wsWatch = null as WebSocket | null export const loadSession = () => { const store = useDocumentStore() try { - tree = JSON.parse(sessionStorage["cista-files"]) + tree = JSON.parse(sessionStorage['cista-files']) store.updateRoot(tree) + console.log(`Loaded session ${tree.length} items`) return true } catch (error) { + if (sessionStorage['cista-files']) console.log("Loading session failed", error) return false } }