From 55b1a46c573818a7870d8cfb172fae834bfbb4cc Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 10 Jan 2023 16:23:49 +0100 Subject: [PATCH] proper check on login --- app/src/frontend/route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/route.tsx b/app/src/frontend/route.tsx index 1d595d22..c43beae9 100644 --- a/app/src/frontend/route.tsx +++ b/app/src/frontend/route.tsx @@ -39,7 +39,7 @@ export const AuthRoute: React.FC = ({ component: Component, children if(isAuthenticated) { let state = props.location.state as any; let from = '/my-account.html'; - if (typeof state == 'object' && 'from' in state){ + if (typeof state == 'object' && state !== null && 'from' in state) { from = state.from; }