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 { ...@@ -82,9 +82,9 @@ export default {
document.activeElement.blur() document.activeElement.blur()
if(event._source){ if(event._source){
this.$router.push('/' + this.lang + '/' + event._id) this.$router.push('/' + this.lang + '/' + event._id)
history.replaceState({article: this.article, search_results: this.search_results, lang: this.lang}, '')
this.search_results = [] this.search_results = []
this.article = event._source this.article = event._source
history.replaceState({article: this.article, search_results: this.search_results, lang: this.lang}, '')
}else{ }else{
var self = this var self = this
self.waiting = true self.waiting = true
...@@ -92,9 +92,9 @@ export default { ...@@ -92,9 +92,9 @@ export default {
axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + event.q) axios.get(api_endpoint + '/' + self.lang + '/_search?q=' + event.q)
.then(function(response){ .then(function(response){
self.$router.push('/' + self.lang + '/_search?q=' + event.q) 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.search_results = response.data.hits.hits
self.waiting = false self.waiting = false
history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang}, '')
}) })
} }
}, },
...@@ -122,6 +122,7 @@ export default { ...@@ -122,6 +122,7 @@ export default {
.then(function(response){ .then(function(response){
self.search_results = response.data.hits.hits self.search_results = response.data.hits.hits
self.waiting = false self.waiting = false
history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang}, '')
}) })
} }
else if(this.$route.params.id){ 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