From 547d0ed7342ad96979bb86cb0eb09f81b9569735 Mon Sep 17 00:00:00 2001 From: axolotle Date: Mon, 11 Mar 2024 14:51:37 +0100 Subject: [PATCH] refactor: vue-router currentRoute is now a ref --- app/src/store/info.js | 1 + app/src/views/LoginView.vue | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/store/info.js b/app/src/store/info.js index 1d92b539..e6819028 100644 --- a/app/src/store/info.js +++ b/app/src/store/info.js @@ -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({ diff --git a/app/src/views/LoginView.vue b/app/src/views/LoginView.vue index 5782f2af..79a5095c 100644 --- a/app/src/views/LoginView.vue +++ b/app/src/views/LoginView.vue @@ -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', + }, ) } })