Skip to content

Commit caca650

Browse files
committed
Replace for-of with Array.some
1 parent 9e2a41e commit caca650

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lib/cli/watch-run.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,9 @@ function matchPattern(filePath, pattern, matchParent) {
259259
}
260260
}
261261

262-
for (const globPath of pattern.globs) {
263-
if (
264-
minimatch(filePath, globPath, {dot: true, windowsPathsNoEscape: true})
265-
) {
266-
return true;
267-
}
268-
}
269-
270-
return false;
262+
return Array.from(pattern.globs).some(globPath =>
263+
minimatch(filePath, globPath, {dot: true, windowsPathsNoEscape: true})
264+
);
271265
}
272266

273267
/**

0 commit comments

Comments
 (0)