fix(ui) - redirect fix

This commit is contained in:
Shekar Siri 2022-06-28 18:05:57 +02:00
parent a46d842c0b
commit 0cb6341988

View file

@ -137,7 +137,7 @@ class Router extends React.Component {
const destinationPath = localStorage.getItem(GLOBAL_DESTINATION_PATH);
if (!isLoggedIn && !location.pathname.includes('login')) {
localStorage.setItem(GLOBAL_DESTINATION_PATH, location.pathname);
} else if (isLoggedIn && !location.pathname.includes(destinationPath)) {
} else if (isLoggedIn && destinationPath && !location.pathname.includes(destinationPath)) {
this.props.history.push(destinationPath || '/');
localStorage.removeItem(GLOBAL_DESTINATION_PATH);
}