Skip to content

Commit 758c8cb

Browse files
committed
lib: refactor to use optional chaining in internal/options.js
1 parent 0f78948 commit 758c8cb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/internal/options.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ const { options, aliases } = getOptions();
66
let warnOnAllowUnauthorized = true;
77

88
function getOptionValue(option) {
9-
const result = options.get(option);
10-
if (!result) {
11-
return undefined;
12-
}
13-
return result.value;
9+
return options.get(option)?.value;
1410
}
1511

1612
function getAllowUnauthorized() {

0 commit comments

Comments
 (0)