copyDirSyncRecursive: Remove obsolete typeof check

Variable `opts` is never undefined at this point because
of "opts = opts || {};".
This commit is contained in:
Timo Tijhof 2013-11-14 01:44:35 +01:00
parent 5c716f9c0d
commit f76a05e874

View file

@ -219,7 +219,7 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
try {
if(fs.statSync(newDirLocation).isDirectory()) {
if(typeof opts !== 'undefined' && opts.forceDelete) {
if(opts.forceDelete) {
exports.rmdirSyncRecursive(newDirLocation);
} else {
return new Error('You are trying to delete a directory that already exists. Specify forceDelete in the opts argument to override this. Bailing~');