Log messages on session loading

This commit is contained in:
Leo Vasanko 2023-11-13 12:11:17 +00:00
parent 07848907f3
commit 9b58b887b4

View File

@ -12,10 +12,12 @@ let wsWatch = null as WebSocket | null
export const loadSession = () => { export const loadSession = () => {
const store = useDocumentStore() const store = useDocumentStore()
try { try {
tree = JSON.parse(sessionStorage["cista-files"]) tree = JSON.parse(sessionStorage['cista-files'])
store.updateRoot(tree) store.updateRoot(tree)
console.log(`Loaded session ${tree.length} items`)
return true return true
} catch (error) { } catch (error) {
if (sessionStorage['cista-files']) console.log("Loading session failed", error)
return false return false
} }
} }