refactor: vue-router currentRoute is now a ref

This commit is contained in:
axolotle 2024-03-11 14:51:37 +01:00
parent f6adc87691
commit 547d0ed734
2 changed files with 4 additions and 1 deletions

View file

@ -153,6 +153,7 @@ export default {
},
DISCONNECT({ dispatch }, route = router.currentRoute) {
// FIXME vue3 currentRoute is now a ref (currentRoute.value)
dispatch('RESET_CONNECTED')
if (router.currentRoute.name === 'login') return
router.push({

View file

@ -102,7 +102,9 @@ export default {
window.location.href = '/yunohost/admin/'
} else {
this.$router.push(
this.$router.currentRoute.query.redirect || { name: 'home' },
this.$router.currentRoute.value.query.redirect || {
name: 'home',
},
)
}
})