Skip to content

Commit

Permalink
Support hashtag from v6 urls
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeauchesne committed Apr 4, 2019
1 parent 8971068 commit aec1468
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/views/documents/DocumentsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
data() {
return {
promise: null,
promise: {},
displayMode: 'both',
listMode: null,
Expand Down Expand Up @@ -203,6 +203,13 @@
load() {
this.displayMode = this.$localStorage.get(this.documentType + '.displayMode', this.documentAreGeoLocalized ? 'both' : 'result');
this.listMode = this.$localStorage.get(this.documentType + '.listMode', false);
if (this.$route.hash) { // keep compatible with v6 AngularJs hacks...
this.$router.replace(this.$route.fullPath.replace('#', '?'));
// $route watcher will call load
return;
}
this.promise = c2c[this.documentType].getAll(this.$route.query);
},
Expand Down

0 comments on commit aec1468

Please sign in to comment.