Skip to content

Commit a14ad3d

Browse files
authored
fix: ignoredPatterns affect option.ignored referrence, cause watchpack error (#24)
1 parent b3fbc2b commit a14ad3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/watch/inclusive-node-watch-file-system.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function createIsIgnored(
1919
ignored: string | RegExp | (string | RegExp)[] | undefined,
2020
excluded: string[]
2121
): (path: string) => boolean {
22-
const ignoredPatterns = ignored ? (Array.isArray(ignored) ? ignored : [ignored]) : [];
22+
const ignoredPatterns = ignored ? (Array.isArray(ignored) ? [...ignored] : [ignored]) : [];
2323

2424
const filteredExcluded = excluded.filter((pattern) => {
2525
// Use `minimatch` to check if the path is a glob pattern.

0 commit comments

Comments
 (0)