Skip to content

Commit 4ef17d1

Browse files
committed
fix: handle 'missing' options
1 parent 767f638 commit 4ef17d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

www/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ module.exports = function init(global, jsUtil, cookieHandler, messages, base64,
498498
function handleMissingOptions(options, globals) {
499499
options = options || {};
500500

501-
return {
501+
return Object.assign({}, options, {
502502
data: jsUtil.getTypeOf(options.data) === 'Undefined' ? null : options.data,
503503
filePath: options.filePath,
504504
followRedirect: checkFollowRedirectValue(options.followRedirect || globals.followRedirect),
@@ -511,6 +511,6 @@ module.exports = function init(global, jsUtil, cookieHandler, messages, base64,
511511
connectTimeout: checkTimeoutValue(options.connectTimeout || globals.connectTimeout),
512512
readTimeout: checkTimeoutValue(options.readTimeout || globals.readTimeout),
513513
timeout: checkTimeoutValue(options.timeout || globals.timeout)
514-
};
514+
});
515515
}
516516
};

0 commit comments

Comments
 (0)