Skip to content

Commit 6255948

Browse files
authored
Filter ignoredFiles before attempting to map them. (#290)
If the `ignoredFiles` is malformed (though natural use of the plugin), and is an array filled with any 'empty'/null values, when it runs the subsequent `ignoredPatternToRegex` method, it triggers an exception. This prevents that from happening.
1 parent 4533a32 commit 6255948

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/model/store-vault-sync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ export class StoreVaultSync {
424424
);
425425

426426
// ignore all new scenes that are known-to-ignore per ignoredFiles
427-
const ignoredRegexes = ignoredFiles.map((p) => ignoredPatternToRegex(p));
427+
const ignoredRegexes = ignoredFiles.filter(n => n).map((p) => ignoredPatternToRegex(p));
428428
const unknownFiles = newScenes.filter(
429429
(s) => ignoredRegexes.find((r) => r.test(s)) === undefined
430430
);

0 commit comments

Comments
 (0)