diff --git a/lib/empty/index.js b/lib/empty/index.js index 23172bdc..a17cbae1 100644 --- a/lib/empty/index.js +++ b/lib/empty/index.js @@ -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)