Fix _.extend usage

it modifies the destination object
This commit is contained in:
Girish Ramakrishnan
2019-04-08 00:32:10 -07:00
parent bdbd336db5
commit 2e40325f2a
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ function resolve(hostname, rrtype, options, callback) {
assert.strictEqual(typeof callback, 'function');
const resolver = new dns.Resolver();
options = _.extend(DEFAULT_OPTIONS, options);
options = _.extend({ }, DEFAULT_OPTIONS, options);
resolver.setServers([ options.server ]);
// should callback with ECANCELLED but looks like we might hit https://github.com/nodejs/node/issues/14814