Merge pull request #302 from CanadaHonk/fix-297

fix: fix crash #297
This commit is contained in:
Thomas Cort 2024-03-11 10:35:48 -04:00 committed by GitHub
commit 6a832ab984
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,6 +64,8 @@ function getInputs() {
}
}
const { ignore } = program.opts();
for (const filenameOrUrl of filenamesOrUrls) {
filenameForOutput = filenameOrUrl;
let baseUrl = '';
@ -94,7 +96,7 @@ function getInputs() {
// skip paths given if it includes a path to ignore.
// todo: allow ignore paths to be glob or regex instead of just includes?
if (program.opts().ignore.some((ignorePath) => resolved.includes(ignorePath))) {
if (ignore && ignore.some((ignorePath) => resolved.includes(ignorePath))) {
continue;
}