Skip to content

Commit 20992db

Browse files
authored
Check if options is defined before accessing insecureSkipVerify
The `insecureSkipVerify` property was being accessed on the `options` object without checking if `options` was defined, leading to a TypeError when `options` was undefined. ````bash Error stack trace: TypeError: Cannot read properties of undefined (reading 'insecureSkipVerify') ...
1 parent 3038a77 commit 20992db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/targets/node/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = function (source, options) {
2828
headers: source.allHeaders
2929
}
3030

31-
if (options.insecureSkipVerify) {
31+
if (options && options.insecureSkipVerify) {
3232
reqOpts.rejectUnauthorized = false
3333
}
3434

0 commit comments

Comments
 (0)