From 7201c9422d1df7ed3e3b5de971eabf1fcd00f807 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/authentication/components/AuthenticationCallback.tsx b/src/authentication/components/AuthenticationCallback.tsx index 810d18d1..ad6458df 100644 --- a/src/authentication/components/AuthenticationCallback.tsx +++ b/src/authentication/components/AuthenticationCallback.tsx @@ -11,7 +11,9 @@ const AuthenticationCallbackComponent: FC = ({ children }) => { const frontPageUrl = getFrontPageUrl().href; try { const user = await USER_MANAGER.signinCallback(); - router.push(user.state || frontPageUrl); + // @ts-ignore + const url: string = user?.state ?? frontPageUrl; + router.push(url); } catch (err) { router.push(frontPageUrl); }