Merge pull request #1035 from matkoniecz/fix/1024-fix-login

proper check on login
This commit is contained in:
Mike Simpson 2023-01-13 14:28:00 +00:00 committed by GitHub
commit 8db468c873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ export const AuthRoute: React.FC<RouteProps> = ({ component: Component, children
if(isAuthenticated) { if(isAuthenticated) {
let state = props.location.state as any; let state = props.location.state as any;
let from = '/my-account.html'; let from = '/my-account.html';
if (typeof state == 'object' && 'from' in state){ if (typeof state == 'object' && state !== null && 'from' in state) {
from = state.from; from = state.from;
} }