From 55fde9c063451bb973dc0be3854ce351d1aa84b0 Mon Sep 17 00:00:00 2001 From: Henrik Askjer <henrik.askjer@uib.no> Date: Thu, 11 Nov 2021 10:11:51 +0100 Subject: [PATCH] fix return to results issue --- src/components/DictionaryView.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index 74a087b..d66da6f 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -241,6 +241,7 @@ export default { monthly_bm: null, monthly_nn: null, event: null, + previous: this.$route.fullPath, } }, computed: { @@ -309,7 +310,7 @@ export default { } }, details_click: function(item) { - item.article.source = this.$route.path + item.article.source = this.previous this.article = item.article history.replaceState({article: this.article, search_results: [], lang: this.lang, error: null}, '') }, @@ -317,6 +318,11 @@ export default { this.article = null } }, + watch: { + $route(to, from) { + this.previous = from.fullPath + } + }, mounted: function(){ let self = this this.lang = 'bm,nn' -- GitLab