This commit is contained in:
Timotheus Kampik 2019-01-27 18:49:15 +01:00
parent ebac7f7149
commit 0fb7f72448

View File

@ -428,12 +428,12 @@ var Search = {
var valid = true; var valid = true;
// check if all requirements are matched // check if all requirements are matched
var filteredTerms = // as search terms with length < 3 are discarded: ignore var filteredTermCount = // as search terms with length < 3 are discarded: ignore
searchterms.filter(function(term){return term.length > 2}).length searchterms.filter(function(term){return term.length > 2}).length
var allRequirementsMatched = fileMap[file].length != searchterms.length && if (
fileMap[file].length != filteredTerms fileMap[file].length != searchterms.length &&
if (allRequirementsMatched) fileMap[file].length != filteredTermCount
continue; ) continue;
// ensure that none of the excluded terms is in the search result // ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) { for (i = 0; i < excluded.length; i++) {