Skip to content

Commit

Permalink
fix: fixed no-unused-vars xo warning
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jul 10, 2024
1 parent 3a43539 commit cd93b40
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit cd93b40

Please sign in to comment.