From 150903ecbdaff280912edcb324c2b5951b20df4f Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 18 May 2024 14:25:37 +0300 Subject: [PATCH] update-token-fix --- src/context/session.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/context/session.tsx b/src/context/session.tsx index 45b79f79..27ed21e5 100644 --- a/src/context/session.tsx +++ b/src/context/session.tsx @@ -225,9 +225,12 @@ export const SessionProvider = (props: { const appdata = session()?.user.app_data if (appdata) { const { profile } = appdata - setAuthor(profile) - addAuthors([profile]) - if (!profile) loadAuthor() + if (profile?.id) { + setAuthor(profile) + addAuthors([profile]) + } else { + setTimeout(loadAuthor, 15) + } } } catch (e) { console.error(e)