diff options
| author | Fuwn <[email protected]> | 2024-01-26 23:29:43 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-26 23:29:43 -0800 |
| commit | 47c4411ee69795aa722d58dc7f33f66ac7a89726 (patch) | |
| tree | 226200180bb42e0d2ea2438cecf7ed6eedff4fb1 /src/routes | |
| parent | fix(limitlistheight): ignore hover cover (diff) | |
| download | due.moe-47c4411ee69795aa722d58dc7f33f66ac7a89726.tar.xz due.moe-47c4411ee69795aa722d58dc7f33f66ac7a89726.zip | |
fix(layout): eager identity fetch
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/+layout.svelte | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index bfece966..c56c42be 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -45,13 +45,6 @@ ? 200 : -200; - $: { - if (data.user !== undefined) - getUserIdentity(data.user).then((h) => { - if ($userIdentity.id === -2) userIdentity.set(h); - }); - } - onMount(async () => { if (browser && localStorage.getItem('redirect')) { window.location.href = localStorage.getItem('redirect') ?? '/'; @@ -60,6 +53,11 @@ } settings.get(); + + if (data.user !== undefined) + getUserIdentity(data.user).then((h) => { + if ($userIdentity.id === -2) userIdentity.set(h); + }); }); </script> |