From 092cef08dd2929a163fdf26f48af1a76d7d93132 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 2 May 2022 11:32:41 +0000 Subject: [PATCH] localstorage --- packages/web/boot.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web/boot.ts b/packages/web/boot.ts index 22926457..4440c842 100644 --- a/packages/web/boot.ts +++ b/packages/web/boot.ts @@ -6,7 +6,7 @@ import { HttpSpacePrimitives } from "@silverbulletmd/common/spaces/http_space_pr safeRun(async () => { // let localSpace = new Space(new IndexedDBSpacePrimitives("pages"), true); // localSpace.watch(); - let token: string | undefined = sessionStorage.getItem("token") || undefined; + let token: string | undefined = localStorage.getItem("token") || undefined; let httpPrimitives = new HttpSpacePrimitives("", token); while (true) { @@ -20,7 +20,7 @@ safeRun(async () => { alert("Sorry, that's it then"); return; } - sessionStorage.setItem("token", token!); + localStorage.setItem("token", token!); httpPrimitives = new HttpSpacePrimitives("", token); } }