Skip to content

Commit

Permalink
Merge pull request #229 from daysv/master
Browse files Browse the repository at this point in the history
fix 'TypeError: callback is not a function' in emptyDir
  • Loading branch information
jprichardson committed Mar 15, 2016
2 parents 2de9f09 + ee02d2f commit 3e16d38
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/empty/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var mkdir = require('../mkdirs')
var remove = require('../remove')

function emptyDir (dir, callback) {
callback = callback || function () {}
fs.readdir(dir, function (err, items) {
if (err) return mkdir.mkdirs(dir, callback)

Expand Down

0 comments on commit 3e16d38

Please sign in to comment.