Skip to content

Commit 8afb2c5

Browse files
authored
Fix imports and add slice
1 parent cd812cd commit 8afb2c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const {
66
} = internalBinding('options');
77

88
const {
9-
StringPrototypeStartsWith,
9+
StringPrototypeSlice,
1010
} = primordials;
1111

1212
let warnOnAllowUnauthorized = true;
@@ -55,7 +55,7 @@ function getOptionValue(optionName) {
5555
optionName[3] === 'o' &&
5656
optionName[4] === '-'
5757
) {
58-
const option = options.get('--' + optionName.slice(5));
58+
const option = options.get('--' + StringPrototypeSlice(optionName, 5));
5959
return option && !option.value;
6060
}
6161
return options.get(optionName)?.value;

0 commit comments

Comments
 (0)