Skip to content
Snippets Groups Projects
Commit 53638ded authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

fikser meta#241

parent 735521fb
No related branches found
No related tags found
No related merge requests found
...@@ -102,6 +102,12 @@ function navigate_to_search(self, query) { ...@@ -102,6 +102,12 @@ function navigate_to_search(self, query) {
axios.get(self.api_pref + 'search?q=' + query) axios.get(self.api_pref + 'search?q=' + query)
.then(function(response){ .then(function(response){
self.search_results = response.data self.search_results = response.data
if (! self.search_results.length) {
self.article = {
lemmas: [],
error: "Vi fant ingen resultater for ''" + query + "'. (Søkeforlag kommer i en senere oppatering av Ordbøkene)"
}
}
self.waiting_for_articles = false self.waiting_for_articles = false
history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang}, '') history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang}, '')
}) })
...@@ -130,7 +136,7 @@ export default { ...@@ -130,7 +136,7 @@ export default {
}, },
computed: { computed: {
waiting: function() { waiting: function() {
return this.waiting_for_articles || this.waiting_for_metadata return (this.waiting_for_articles || this.waiting_for_metadata) && this.$route.name != 'root'
}, },
api_pref: function() { api_pref: function() {
return api_endpoint + '/' + this.lang + '/article/' return api_endpoint + '/' + this.lang + '/article/'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment