From a8c2fb6884659950c107b672156385af75d31bba Mon Sep 17 00:00:00 2001 From: Mattias Granlund Date: Thu, 16 Nov 2023 11:04:27 +0100 Subject: [PATCH] Fixes user login that broke in previous commit --- packages/ui/src/lib/components/Login.svelte | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/lib/components/Login.svelte b/packages/ui/src/lib/components/Login.svelte index 1f6003565..160f8c3a4 100644 --- a/packages/ui/src/lib/components/Login.svelte +++ b/packages/ui/src/lib/components/Login.svelte @@ -15,9 +15,8 @@ const pollForUser = async (token: string) => { const apiUser = await cloud.login.user.get(token).catch(() => null); if (apiUser) { - user = apiUser; - userService.logout; - return apiUser; + userService.set(apiUser); + return; } return new Promise((resolve) => { setTimeout(async () => {