Skip to content

Commit

Permalink
lib: refactor to use optional chaining in internal/options.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RaisinTen committed Jan 15, 2021
1 parent 0f78948 commit 758c8cb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/internal/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ const { options, aliases } = getOptions();
let warnOnAllowUnauthorized = true;

function getOptionValue(option) {
const result = options.get(option);
if (!result) {
return undefined;
}
return result.value;
return options.get(option)?.value;
}

function getAllowUnauthorized() {
Expand Down

0 comments on commit 758c8cb

Please sign in to comment.