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

Commit

Permalink
Only access bar.tick when progress bar is enabled
Browse files Browse the repository at this point in the history
Fixes #24
  • Loading branch information
jrudolph committed Aug 10, 2020
1 parent 35d775e commit 74ff87f
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 74ff87f

Please sign in to comment.