proper check on login
This commit is contained in:
parent
7199c7f6a3
commit
55b1a46c57
@ -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