diff --git a/lib/internal/url.js b/lib/internal/url.js index cf0271691a..18594a86fd 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -170,7 +170,7 @@ class URLSearchParams { return ctx.stylize('[Object]', 'special'); var separator = ', '; - var innerOpts = Object.assign({}, ctx); + var innerOpts = util._extend({}, ctx); if (recurseTimes !== null) { innerOpts.depth = recurseTimes - 1; } @@ -373,7 +373,7 @@ Object.defineProperties(URL.prototype, { value: function format(options) { if (options && typeof options !== 'object') throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'object'); - options = Object.assign({ + options = util._extend({ fragment: true, unicode: false, search: true, @@ -1244,7 +1244,7 @@ defineIDLClass(URLSearchParamsIteratorPrototype, 'URLSearchParamsIterator', { if (typeof recurseTimes === 'number' && recurseTimes < 0) return ctx.stylize('[Object]', 'special'); - const innerOpts = Object.assign({}, ctx); + const innerOpts = util._extend({}, ctx); if (recurseTimes !== null) { innerOpts.depth = recurseTimes - 1; }