We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 564b973 commit 5ce03b7Copy full SHA for 5ce03b7
src/matches.ts
@@ -18,6 +18,8 @@ export function matches(
18
? normalizedText === normalizedMatcher
19
: normalizedText.toLowerCase().includes(normalizedMatcher.toLowerCase());
20
} else {
21
+ // Reset state for global regexes: https://stackoverflow.com/a/1520839/484499
22
+ matcher.lastIndex = 0;
23
return matcher.test(normalizedText);
24
}
25
0 commit comments