proper check on login

This commit is contained in:
Mateusz Konieczny 2023-01-10 16:23:49 +01:00
parent 7199c7f6a3
commit 55b1a46c57

View File

@ -39,7 +39,7 @@ export const AuthRoute: React.FC<RouteProps> = ({ 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;
}