diff --git a/src/App.vue b/src/App.vue index 8c99a0d603eb3a5c7b1d3ab18be304aa52ca33be..c2e301f231ffe13ac5422101432f626a96ce2838 100644 --- a/src/App.vue +++ b/src/App.vue @@ -82,9 +82,9 @@ export default { document.activeElement.blur() if(event._source){ this.$router.push('/' + this.lang + '/' + event._id) - history.replaceState({article: this.article, search_results: this.search_results, lang: this.lang}, '') this.search_results = [] this.article = event._source + history.replaceState({article: this.article, search_results: this.search_results, lang: this.lang}, '') }else{ var self = this self.waiting = true @@ -92,9 +92,9 @@ export default { axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + event.q) .then(function(response){ self.$router.push('/' + self.lang + '/_search?q=' + event.q) - history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang}, '') self.search_results = response.data.hits.hits self.waiting = false + history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang}, '') }) } }, @@ -122,6 +122,7 @@ export default { .then(function(response){ self.search_results = response.data.hits.hits self.waiting = false + history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang}, '') }) } else if(this.$route.params.id){