This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git


The following commit(s) were added to refs/heads/master by this push:
     new f4cf008  Fixing multiple redirects on logout (#771)
f4cf008 is described below

commit f4cf0086951d2d5c72a53ef6f329244897033542
Author: davidjumani <[email protected]>
AuthorDate: Wed Sep 30 16:37:18 2020 +0530

    Fixing multiple redirects on logout (#771)
---
 src/utils/request.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/utils/request.js b/src/utils/request.js
index 9371aee..836f6bf 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -59,7 +59,9 @@ const err = (error) => {
         duration: 0
       })
       store.dispatch('Logout').then(() => {
-        router.push({ path: '/user/login', query: { redirect: 
router.history.current.fullPath } })
+        if (router.history.current.path !== '/user/login') {
+          router.push({ path: '/user/login', query: { redirect: 
router.history.current.fullPath } })
+        }
       })
     }
     if (response.status === 404) {

Reply via email to