From dc5684c20f4db701e5be690cc7a57fed55243575 Mon Sep 17 00:00:00 2001
From: Henrik Askjer <henrik.askjer@uib.no>
Date: Wed, 17 Nov 2021 11:57:31 +0100
Subject: [PATCH] fix bug when choosing all word classes

---
 src/components/DictionaryView.vue | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue
index d39ffe13..37e216d0 100644
--- a/src/components/DictionaryView.vue
+++ b/src/components/DictionaryView.vue
@@ -333,7 +333,8 @@ export default {
         })
       },
       pos_param: function() {
-        return this.pos_selected.tag? '/'+this.pos_selected.tag.toLowerCase(): ''
+        if (this.pos_selected.tag) return this.pos_selected.tag.toLowerCase()
+        return ''
       },
       update_lang_form: function (lang) {
         this.lang = lang
@@ -359,15 +360,16 @@ export default {
         if(this.$route.name == 'word') {
             name = "w"
             query = this.$route.params.word
-            this.$router.push(`/${this.lang}/${name}/${query}/${pos.tag.toLowerCase()}`)
+            this.$router.push(`/${this.lang}/${name}/${query+this.pos_param()}`)
             navigate_to_query(this, query)
         }
         else if (this.$route.name == 'search') {
-           name = "search"
-           query = this.$route.params.query
-           this.$router.push(`/${this.lang}/${name}/${query}/${pos.tag.toLowerCase()}`)
-           navigate_to_query(this, query)
+          name = "search"
+          query = this.$route.params.query
+          this.$router.push(`/${this.lang}/${name}/${query+this.pos_param()}`)
+          navigate_to_query(this, query)
         }
+        
       },
     article_link_click: function(item) {
       if (this.article && this.article.article_id == item.article_id){
-- 
GitLab