Skip to content

Commit 6a832ab

Browse files
authored
Merge pull request #302 from CanadaHonk/fix-297
fix: fix crash #297
2 parents 62c5336 + 641b837 commit 6a832ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

markdown-link-check

+3-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ function getInputs() {
6464
}
6565
}
6666

67+
const { ignore } = program.opts();
68+
6769
for (const filenameOrUrl of filenamesOrUrls) {
6870
filenameForOutput = filenameOrUrl;
6971
let baseUrl = '';
@@ -94,7 +96,7 @@ function getInputs() {
9496

9597
// skip paths given if it includes a path to ignore.
9698
// todo: allow ignore paths to be glob or regex instead of just includes?
97-
if (program.opts().ignore.some((ignorePath) => resolved.includes(ignorePath))) {
99+
if (ignore && ignore.some((ignorePath) => resolved.includes(ignorePath))) {
98100
continue;
99101
}
100102

0 commit comments

Comments
 (0)