Skip to content

Commit

Permalink
#214 Literature API calls (BHL & Trove) is showing duplicate query te…
Browse files Browse the repository at this point in the history
…rms.
  • Loading branch information
Rita-C committed May 19, 2020
1 parent f55f649 commit 11614bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions grails-app/assets/javascripts/species.show.js
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,9 @@ function loadBhl(start, rows, scroll) {
}
if (synonyms) {
for (i = 0; i < synonyms.length; i++) {
if (synonyms[i] == taxonName) {
continue;
}
if (query.length > 0)
query = query + "&";
query = query + "s=" + encodeURIComponent(synonyms[i]);
Expand Down
6 changes: 4 additions & 2 deletions grails-app/assets/javascripts/trove.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ function loadTrove(url, query, synonyms, containerDivId, resultsDivId, previousB
TROVE.query = query;
if (synonyms) {
for (var i = 0; i < synonyms.length; i++) {
query = query + '" OR "' + (synonyms[i]);
TROVE.query += ', ' + synonyms[i];
if (synonyms[i] != query) {
query = query + '" OR "' + (synonyms[i]);
TROVE.query += ', ' + synonyms[i];
}
}
}

Expand Down

1 comment on commit 11614bf

@charvolant
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Please sign in to comment.