Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from jrudolph/patch-1
Browse files Browse the repository at this point in the history
Only access bar.tick when progress bar is enabled
  • Loading branch information
gaurav-nelson committed Aug 12, 2020
2 parents 35d775e + 74ff87f commit c17a7d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ module.exports = function asciidocLinkCheck(asciidoc, opts, callback) {
linkCheckResult.link = link;
linkCheckResult.statusCode = 0;
linkCheckResult.status = 'ignored';
bar.tick();
if (opts.showProgressBar) {
bar.tick();
}
callback(null, linkCheckResult);
return;
}
Expand All @@ -49,4 +51,4 @@ module.exports = function asciidocLinkCheck(asciidoc, opts, callback) {
callback(err, result);
});
}, callback);
};
};

0 comments on commit c17a7d3

Please sign in to comment.