From c68886e1c06f8dfbcc9275ec24e361ba931f016c Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 1 Jul 2020 19:16:01 +0200 Subject: [PATCH] Prevent loading the list + kanban board again when closing the task popup --- src/views/list/ShowList.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/list/ShowList.vue b/src/views/list/ShowList.vue index a5d8da89..565882d4 100644 --- a/src/views/list/ShowList.vue +++ b/src/views/list/ShowList.vue @@ -69,6 +69,9 @@ background() { return this.$store.state.background }, + currentList() { + return typeof this.$store.state.currentList === 'undefined' ? {id: 0} : this.$store.state.currentList + }, }, methods: { loadList() { @@ -85,7 +88,10 @@ } // Don't load the list if we either already loaded it or aren't dealing with a list at all currently - if (this.$route.params.listId === this.listLoaded || typeof this.$route.params.listId === 'undefined') { + if ( + this.$route.params.listId === this.listLoaded || + typeof this.$route.params.listId === 'undefined' || + this.$route.params.listId === this.currentList.id) { return } @@ -96,7 +102,6 @@ this.$route.name !== 'list.table' && this.$route.name !== 'list.kanban' ) { - const savedListView = getListView(this.$route.params.listId) router.replace({name: savedListView, params: {id: this.$route.params.listId}})