diff --git a/lib/remove/rimraf.js b/lib/remove/rimraf.js index 1e44c128..2c771026 100644 --- a/lib/remove/rimraf.js +++ b/lib/remove/rimraf.js @@ -113,9 +113,6 @@ function fixWinEPERM (p, options, er, cb) { assert(p) assert(options) assert(typeof cb === 'function') - if (er) { - assert(er instanceof Error) - } options.chmod(p, 0o666, er2 => { if (er2) { @@ -139,9 +136,6 @@ function fixWinEPERMSync (p, options, er) { assert(p) assert(options) - if (er) { - assert(er instanceof Error) - } try { options.chmodSync(p, 0o666) @@ -173,9 +167,6 @@ function fixWinEPERMSync (p, options, er) { function rmdir (p, options, originalEr, cb) { assert(p) assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } assert(typeof cb === 'function') // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) @@ -268,9 +259,6 @@ function rimrafSync (p, options) { function rmdirSync (p, options, originalEr) { assert(p) assert(options) - if (originalEr) { - assert(originalEr instanceof Error) - } try { options.rmdirSync(p)