fix: use replaceAll

This commit is contained in:
shiftinv 2022-10-21 22:13:36 +02:00
parent 416928f718
commit f075cd50d3
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ export function wildcardMatch(pattern: string, target: string): boolean {
// escape everything else
pattern = pattern.split("*").map(_escapeRegex).join(".*");
// treat `,` as `|`
pattern = pattern.replace(",", "|");
pattern = pattern.replaceAll(",", "|");
// add anchors
pattern = `^(${pattern})$`;