Skip to content

Commit

Permalink
Fix issues with search javascript (#4176)
Browse files Browse the repository at this point in the history
A comparison was previously relying on type coercion, and when linting fixes
changed this to an exact comparison operator, this comparison started failing.
  • Loading branch information
agjohnson authored May 31, 2018
1 parent ed595b3 commit 3ee8877
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion readthedocs/core/static-src/core/js/doc-embed/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function attach_elastic_search_query(data) {
.attr('href', item_url)
.html(fields.title)
);
if (fields.project !== project) {
// fields.project is returned as an array
if (fields.project.indexOf(project) === -1) {
list_item.append(
$('<span>')
.text(" (from project " + fields.project + ")")
Expand Down

0 comments on commit 3ee8877

Please sign in to comment.