File tree 6 files changed +30
-5
lines changed
static/js/vue-cdr-access/src/components
6 files changed +30
-5
lines changed Original file line number Diff line number Diff line change 41
41
methods: {
42
42
getResults () {
43
43
let update_params = { anywhere: encodeURIComponent (this .search_query ) };
44
- this .$router .push ({ name: ' displayRecords' , query: this .urlParams (update_params) });
44
+ this .$router .push ({ name: ' displayRecords' , query: this .urlParams (update_params) })
45
+ .catch ((e ) => {
46
+ if (e .name !== ' NavigationDuplicated' ) {
47
+ throw e;
48
+ }
49
+ });
45
50
},
46
51
47
52
clearSearch () {
Original file line number Diff line number Diff line change 39
39
this .$router .push ({
40
40
path: this .$route .path ,
41
41
query: this .urlParams ({ sort: this .sort_order }, is_search_sort)
42
+ }).catch ((e ) => {
43
+ if (e .name !== ' NavigationDuplicated' ) {
44
+ throw e;
45
+ }
42
46
});
43
47
this .sort_order = ' ' ;
44
48
}
Original file line number Diff line number Diff line change 108
108
109
109
updateUrl () {
110
110
let params = this .setTypes ();
111
- this .$router .push ({ name: ' displayRecords' , query: params });
111
+ this .$router .push ({ name: ' displayRecords' , query: params }).catch ((e ) => {
112
+ if (e .name !== ' NavigationDuplicated' ) {
113
+ throw e;
114
+ }
115
+ });
112
116
},
113
117
114
118
updateParams () {
Original file line number Diff line number Diff line change 124
124
// Add/Update with new facets
125
125
base_search .query = Object .assign (base_search .query , updated_facet_params .queryFacets );
126
126
127
- this .$router .push (base_search);
127
+ this .$router .push (base_search).catch ((e ) => {
128
+ if (e .name !== ' NavigationDuplicated' ) {
129
+ throw e;
130
+ }
131
+ });
128
132
},
129
133
130
134
/**
Original file line number Diff line number Diff line change 37
37
e .preventDefault ();
38
38
this .browse_type = e .target .id ;
39
39
let update_params = { browse_type: encodeURIComponent (this .browse_type ) };
40
- this .$router .push ({ name: ' displayRecords' , query: this .urlParams (update_params) });
40
+ this .$router .push ({ name: ' displayRecords' , query: this .urlParams (update_params) }).catch ((e ) => {
41
+ if (e .name !== ' NavigationDuplicated' ) {
42
+ throw e;
43
+ }
44
+ });
41
45
sessionStorage .setItem (' browse-type' , this .browse_type );
42
46
}
43
47
},
Original file line number Diff line number Diff line change 41
41
params .types = this .updateWorkType (this .adminUnit , this .works_only ).types ;
42
42
params .works_only = this .works_only ;
43
43
44
- this .$router .push ({ name: ' displayRecords' , query: params });
44
+ this .$router .push ({ name: ' displayRecords' , query: params }).catch ((e ) => {
45
+ if (e .name !== ' NavigationDuplicated' ) {
46
+ throw e;
47
+ }
48
+ });
45
49
}
46
50
},
47
51
You can’t perform that action at this time.
0 commit comments