fix double routing with await

This commit is contained in:
Moriz Wahl 2023-04-05 14:43:23 +02:00
parent 8ab14bee42
commit fa84c21092
2 changed files with 5 additions and 7 deletions

View File

@ -8,11 +8,9 @@ const routerPushMock = jest.fn()
const mocks = { const mocks = {
$router: { $router: {
push: routerPushMock, push: routerPushMock,
history: {
current: {
fullPath: '/transactions',
},
}, },
$route: {
path: '/transactions',
}, },
} }

View File

@ -34,8 +34,8 @@ export default {
}, },
}, },
methods: { methods: {
tunnelEmail() { async tunnelEmail() {
if (this.$router.history.current.fullPath !== '/send') this.$router.push({ path: '/send' }) if (this.$route.path !== '/send') await this.$router.push({ path: '/send' })
this.$router.push({ query: { gradidoID: this.linkedUser.gradidoID } }) this.$router.push({ query: { gradidoID: this.linkedUser.gradidoID } })
}, },
}, },