diff options
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> |