diff options
Diffstat (limited to 'src/store/api.js')
-rw-r--r-- | src/store/api.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/store/api.js b/src/store/api.js index c8f1edae..4a8b8e80 100644 --- a/src/store/api.js +++ b/src/store/api.js @@ -19,6 +19,13 @@ api.interceptors.response.use(undefined, error => { } if (response.status == 403) { + if (router.history.current.name === 'unauthorized') { + // Check if current router location is unauthorized + // to avoid NavigationDuplicated errors. + // The router throws an error if trying to push to the + // same/current router location. + return; + } router.push({ name: 'unauthorized' }); } |