Skip to content

Commit

Permalink
Fix a bug that validator failed to get cli opts (#34210)
Browse files Browse the repository at this point in the history
  • Loading branch information
antiphoton authored May 4, 2021
1 parent a71eafe commit 20a587e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions validator/js/nodejs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,12 @@ function main() {
if (item === '-') {
inputs.push(readFromStdin());
} else if (isHttpOrHttpsUrl(item)) {
inputs.push(readFromUrl(item, program.userAgent));
inputs.push(readFromUrl(item, opts.userAgent));
} else {
inputs.push(readFromFile(item));
}
}
getInstance(program.validator_js, program.userAgent)
getInstance(opts.validator_js, opts.userAgent)
.then(function(validator) {
return validator.init().then(() => validator);
})
Expand Down

0 comments on commit 20a587e

Please sign in to comment.