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 = () => {
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
}
}