diff options
| author | Fuwn <[email protected]> | 2026-03-28 06:09:40 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-28 06:09:40 +0000 |
| commit | b48a27fe04d893c92b28c97d3f78357ce67bb419 (patch) | |
| tree | 89f568bfbd26b404bbb3e09fb29e3af50890be46 /src/routes/user/+page.svelte | |
| parent | fix(preferences): preserve partial preference updates (diff) | |
| download | due.moe-b48a27fe04d893c92b28c97d3f78357ce67bb419.tar.xz due.moe-b48a27fe04d893c92b28c97d3f78357ce67bb419.zip | |
fix(cache): preserve hydrated client state
Diffstat (limited to 'src/routes/user/+page.svelte')
| -rw-r--r-- | src/routes/user/+page.svelte | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/user/+page.svelte b/src/routes/user/+page.svelte index ee7c69af..20a8d390 100644 --- a/src/routes/user/+page.svelte +++ b/src/routes/user/+page.svelte @@ -11,7 +11,8 @@ import localforage from "localforage"; onMount(async () => { if (browser) { - const user = ((await localforage.getItem("identity")) as UserIdentity).name; + const identity = await localforage.getItem<UserIdentity>("identity"); + const user = identity?.name; if (user) { if (browser && $page.url.searchParams.get("badges") !== null) { |