From 3d912f4af1317ffd1a2317d40384b57030a7d8e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 29 Mar 2021 10:01:32 +0200 Subject: [PATCH] Avoid reusing the existing route object to make navigation work properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/navigation/AppNavigationBoard.vue | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/components/navigation/AppNavigationBoard.vue b/src/components/navigation/AppNavigationBoard.vue index 157d278c5..721ba92ec 100644 --- a/src/components/navigation/AppNavigationBoard.vue +++ b/src/components/navigation/AppNavigationBoard.vue @@ -235,9 +235,7 @@ export default { try { const newBoard = await this.$store.dispatch('cloneBoard', this.board) this.loading = false - const route = this.routeTo - route.params.id = newBoard.id - this.$router.push(route) + this.$router.push({ name: 'board', params: { id: newBoard.id } }) } catch (e) { OC.Notification.showTemporary(t('deck', 'An error occurred')) console.error(e) @@ -278,9 +276,7 @@ export default { ) }, actionDetails() { - const route = this.routeTo - route.name = 'board.details' - this.$router.push(route) + this.$router.push({ name: 'board.details', params: { id: this.routeTo.id } }) }, applyEdit(e) { this.editing = false @@ -298,11 +294,6 @@ export default { cancelEdit(e) { this.editing = false }, - showSidebar() { - const route = this.routeTo - route.name = 'board.details' - this.$router.push(route) - }, async updateSetting(key, value) { this.updateDueSetting = value const setting = {}