This commit is contained in:
Jeff King 2019-03-21 13:04:19 -07:00
Родитель ca941c6980
Коммит 6c5877c6cf
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -92,11 +92,11 @@ class ResultsStore {
}
if (filterText) {
// At least one field matching sufficient.
const ciIncludes = (a, b) => !a || a.toLowerCase().includes(b.toLowerCase())
if (!( ciIncludes(r.ruleObj && r.ruleObj.desc || '', filterText)
|| ciIncludes(r.path , filterText)
|| ciIncludes(r.details.toString(), filterText)
)) return false
const ciIncludes = (a, b) => a && a.toLowerCase().includes(b.toLowerCase())
const rowIncludesTerm = ciIncludes(r.ruleObj && r.ruleObj.desc || '', filterText)
|| ciIncludes(r.path , filterText)
|| ciIncludes(r.details.toString() , filterText)
if (!rowIncludesTerm) return false
}
return true
})