From 2be7283dff9fa4360018b03f125fed205dd69f30 Mon Sep 17 00:00:00 2001 From: Levi McGlone Date: Wed, 4 Dec 2019 08:43:57 -0500 Subject: [PATCH] fix matches to account for empty strings --- src/lib/matches.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/matches.js b/src/lib/matches.js index 5eefdea..9ca587b 100644 --- a/src/lib/matches.js +++ b/src/lib/matches.js @@ -3,7 +3,7 @@ function fuzzyMatches(textToMatch, node, matcher, normalizer) { return textToMatch == matcher; } - if (!textToMatch) { + if (!textToMatch && textToMatch !== '') { return false; } @@ -22,7 +22,7 @@ function matches(textToMatch, node, matcher, normalizer) { return textToMatch === matcher; } - if (!textToMatch) { + if (!textToMatch && textToMatch !== '') { return false; }