fix: fix crash #297

This commit is contained in:
CanadaHonk 2024-03-11 14:27:54 +00:00 committed by GitHub
parent 1a97f22963
commit 641b837e7d
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;
}