From 0cb63419888e553565b591ccef528485585e21c8 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 28 Jun 2022 18:05:57 +0200 Subject: [PATCH] fix(ui) - redirect fix --- frontend/app/Router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }