From 4e40b31bacfd59b65936f3f792554f2b925a7152 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Wed, 2 Feb 2022 15:06:57 +0000 Subject: [PATCH] Fix for compilation error ERROR in src/frontend/route.tsx:36:25 TS2339: Property 'from' does not exist on type '{}'. --- app/src/frontend/route.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/route.tsx b/app/src/frontend/route.tsx index 47db3003..62c38042 100644 --- a/app/src/frontend/route.tsx +++ b/app/src/frontend/route.tsx @@ -33,7 +33,12 @@ export const AuthRoute: React.FC = ({ component: Component, children {...rest} render={props => { if(isAuthenticated) { - const { from } = props.location.state ?? { from: '/my-account.html'}; + let state = props.location.state as any; + let from = '/my-account.html'; + if ('from' in state){ + from = state.from; + } + return ; } else { if(Component) {