Merge pull request #1035 from matkoniecz/fix/1024-fix-login
proper check on login
This commit is contained in:
commit
8db468c873
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user