Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRibreau committed Nov 6, 2020
1 parent 7e157f4 commit f76272e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.js
Expand Up @@ -28,10 +28,8 @@ function defaultPromiseFactory(resolver) {
function _cloneOptions(options) {
const cloned = {};
for (let key in options) {
if (key === 'agent') {
cloned[key] = options[key];
} else {
cloned[key] = _.cloneDeep(options[key]);
if (options.hasOwnProperty(key)) {
cloned[key] = key === 'agent' ? options[key] : _.cloneDeep(options[key]);
}
}
return cloned;
Expand Down

0 comments on commit f76272e

Please sign in to comment.