diff --git a/src/pages/LendingTeams/TeamListing.vue b/src/pages/LendingTeams/TeamListing.vue index e55e0cb57e..e1d327c2ba 100644 --- a/src/pages/LendingTeams/TeamListing.vue +++ b/src/pages/LendingTeams/TeamListing.vue @@ -384,7 +384,7 @@ export default { this.pageQuery = { page: this.offset / this.limit }; this.pushChangesToUrl(); }, - pushChangesToUrl() { + async pushChangesToUrl() { const pushToRouter = variable => { this.$router.push({ query: { @@ -405,7 +405,7 @@ export default { if (this.teamCategory === '' && this.teamCategory !== this.$route.query?.category) { const query = { ...this.$route.query }; delete query?.category; - this.$router.replace({ query }); + await this.$router.push({ query }); } if (this.teamOption && this.teamOption !== this.$route.query?.teamOption) { pushToRouter('teamOption'); @@ -414,7 +414,7 @@ export default { if (this.teamOption === '' && this.teamOption !== this.$route.query?.teamOption) { const query = { ...this.$route.query }; delete query?.teamOption; - this.$router.replace({ query }); + await this.$router.push({ query }); } if (this.queryString && this.queryString !== this.$route.query?.queryString) { pushToRouter('queryString'); diff --git a/src/pages/StartVerification.vue b/src/pages/StartVerification.vue index 94edea4670..a6891f5363 100644 --- a/src/pages/StartVerification.vue +++ b/src/pages/StartVerification.vue @@ -135,7 +135,7 @@ export default { this.apollo.mutate({ mutation: startEmailVerification, variables: { - doneUrl: this.doneUrl || null, + doneUrl: this.doneUrl || '', }, awaitRefetchQueries: true, refetchQueries: [ diff --git a/src/util/authenticationGuard.js b/src/util/authenticationGuard.js index 2ab6b161f8..61f4854b4a 100644 --- a/src/util/authenticationGuard.js +++ b/src/util/authenticationGuard.js @@ -16,11 +16,12 @@ export function checkLastLoginTime(data, durationKey, defaultDuration) { } const processErrors = (error, route) => { + const doneUrl = route?.value?.fullPath || route?.fullPath || ''; if (error.message.indexOf('activeLoginRequired') > -1 || error.message.indexOf('recentLoginRequired') > -1) { // Force a login when active/recent login is required return { path: '/ui-login', - query: { force: true, doneUrl: route.fullPath } + query: { force: true, doneUrl } }; } @@ -28,7 +29,7 @@ const processErrors = (error, route) => { // Redirect to login upon authentication error return { path: '/ui-login', - query: { doneUrl: route.fullPath } + query: { doneUrl } }; } @@ -38,7 +39,7 @@ const processErrors = (error, route) => { return { path: '/start-verification', query: { - doneUrl: route.fullPath, + doneUrl, process: lastMatchedRoute.meta.process || '', } }; @@ -54,7 +55,7 @@ const processErrors = (error, route) => { // catch all redirect to login return { path: '/ui-login', - query: { doneUrl: route.fullPath } + query: { doneUrl } }; };