Fixing multiple redirects on logout (#771)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
davidjumani 2020-09-30 16:37:18 +05:30 committed by Rohit Yadav
parent eda6929b79
commit 57b67e0b2a

View File

@ -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) {