From b90441e1afd4850239c343468e34c470d95cf5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20H=C3=B8rl=C3=BCck=20Berg?= <36937807+henrikhorluck@users.noreply.github.com> Date: Tue, 13 Feb 2024 23:55:45 +0100 Subject: [PATCH] Fix typing error --- src/authentication/components/AuthenticationCallback.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/authentication/components/AuthenticationCallback.tsx b/src/authentication/components/AuthenticationCallback.tsx index 810d18d1..c96b8ab5 100644 --- a/src/authentication/components/AuthenticationCallback.tsx +++ b/src/authentication/components/AuthenticationCallback.tsx @@ -11,7 +11,10 @@ const AuthenticationCallbackComponent: FC = ({ children }) => { const frontPageUrl = getFrontPageUrl().href; try { const user = await USER_MANAGER.signinCallback(); - router.push(user.state || frontPageUrl); + // eslint-disable-next-line + // @ts-ignore + const url: string = user?.state ?? frontPageUrl; + router.push(url); } catch (err) { router.push(frontPageUrl); }