diff --git a/frontend/app/Router.js b/frontend/app/Router.js index b303c6b40..f5dc4c593 100644 --- a/frontend/app/Router.js +++ b/frontend/app/Router.js @@ -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); }