Skip to content

Commit 2010bec

Browse files
author
ZoeLeBlanc
committed
trying to remove js changes
1 parent 1a787e7 commit 2010bec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

js/lessonfilter.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,11 @@ function lunrSearch(searchString, idx, corpus, featureList, uri) {
104104
let condition = params.topic ? topicsArray.includes(type) : item.values().activity == type;
105105
// return items in list that are in search results and filter if clicked
106106
return docs.find((doc) => {
107-
let title = doc.title.includes('&') ? doc.title.replace('&', '&') : doc.title;
108-
if (title === item.values().title) {
107+
if (doc.title === item.values().title) {
109108
// update score values for item
110109
item.values().score = doc.score;
111110
// Could simply to just do Object.keys(params) > 1 here but in case we add more URI values this will explicitly check for filters along with search
112-
return ['topic', 'activity'].some(key => Object.keys(params).includes(key)) ? ((title === item.values().title) && condition) : (title === item.values().title);
111+
return ['topic', 'activity'].some(key => Object.keys(params).includes(key)) ? ((doc.title === item.values().title) && condition) : (doc.title === item.values().title);
113112
}
114113

115114
});

0 commit comments

Comments
 (0)