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

fikset historiefeil som oppsto i forrige commit

parent 41e80782
No related branches found
No related tags found
No related merge requests found
......@@ -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){
......
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