From dc23721b75405ff27624210598799366bdad91a9 Mon Sep 17 00:00:00 2001 From: smizrahi Date: Mon, 11 Sep 2023 14:55:44 +0200 Subject: [PATCH] fix(js): Fix url redirection to null when disconnected. Closes #5844. --- UI/WebServerResources/js/Common/Common.app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UI/WebServerResources/js/Common/Common.app.js b/UI/WebServerResources/js/Common/Common.app.js index ef5d7ac15..06a23e162 100644 --- a/UI/WebServerResources/js/Common/Common.app.js +++ b/UI/WebServerResources/js/Common/Common.app.js @@ -343,7 +343,11 @@ else { $state = $injector.get('$state'); angular.element($window).off('beforeunload'); - $window.location.href = $window.ApplicationBaseURL + $state.href($state.current); + if ($state.href($state.current)) { + $window.location.href = $window.ApplicationBaseURL + $state.href($state.current); + } else { + $window.location.href = $window.ApplicationBaseURL; + } return $q.reject(); } }