diff --git a/components/ResultsStore.ts b/components/ResultsStore.ts index f50b7f2..c6d33d1 100644 --- a/components/ResultsStore.ts +++ b/components/ResultsStore.ts @@ -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 })