diff --git a/lib/consolidate.js b/lib/consolidate.js index 59eca13..fc736fb 100644 --- a/lib/consolidate.js +++ b/lib/consolidate.js @@ -180,8 +180,7 @@ function fromStringRenderer(name) { return promisify(cb, function (cb) { readPartials(path, options, function (err, partials) { - const extend = requires.extend || (requires.extend = Object.assign); - const opts = extend({}, options); + const opts = { ...options }; opts.partials = partials; if (err) return cb(err); if (cache(opts)) { @@ -1421,10 +1420,8 @@ exports.ractive.render = function (str, options, cb) { options.template = template; if (options.data === null || options.data === undefined) { - const extend = requires.extend || (requires.extend = Object.assign); - // Shallow clone the options object - options.data = extend({}, options); + options.data = { ...options }; // Remove consolidate-specific properties from the clone let i;