Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed May 13, 2022
1 parent 428b8c0 commit a727309
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ Metalsmith.prototype.process = unyield(function* () {
*/

Metalsmith.prototype.run = unyield(function* (files, plugins) {
this._files = files
const ware = new Ware(plugins || this.plugins)
const run = thunkify(ware.run.bind(ware))
const res = yield run(files, this)
Expand Down Expand Up @@ -422,9 +423,7 @@ Metalsmith.prototype.read = unyield(function* (dir) {
complete += concurrency
}

const result = paths.reduce(memoizer, {})
this._files = result
return result
return paths.reduce(memoizer, {})

function memoizer(memo, file, i) {
file = path.relative(dir, file)
Expand Down

0 comments on commit a727309

Please sign in to comment.