Skip to content

Commit

Permalink
Merge 9c92bbb into 694bf86
Browse files Browse the repository at this point in the history
  • Loading branch information
thostetler committed Feb 23, 2022
2 parents 694bf86 + 9c92bbb commit 01a8adc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions src/js/apps/discovery/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,14 @@ define([
},

feedbackPage: function(subview, query) {
const q = new ApiQuery();
if (query) {
try {
q.load(query);
} catch (e) {
// ignore query loading errors
}
}
// if necessary encode ampersands present in the bibcode
query = query.replace('&', encodeURIComponent('&'));
const params = new URLSearchParams(query);

this.routerNavigate(`ShowFeedback`, {
subview,
href: `#feedback/${subview}`,
bibcode: q.has('bibcode') ? q.get('bibcode')[0] : null,
bibcode: params.get('bibcode'),
});
},

Expand Down Expand Up @@ -230,7 +226,9 @@ define([
this.routerNavigate('UserSettings', {
subView: subView,
});
} else if (_.contains(['librarylink', 'orcid', 'application', 'export'], subView)) {
} else if (
_.contains(['librarylink', 'orcid', 'application', 'export'], subView)
) {
// show preferences if no subview provided
this.routerNavigate('UserPreferences', {
subView: subView,
Expand Down
2 changes: 1 addition & 1 deletion src/shared

0 comments on commit 01a8adc

Please sign in to comment.