From f76a05e87403e76d270f05caa563af623c2a14ab Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 14 Nov 2013 01:44:35 +0100 Subject: [PATCH] copyDirSyncRecursive: Remove obsolete typeof check Variable `opts` is never undefined at this point because of "opts = opts || {};". --- lib/wrench.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wrench.js b/lib/wrench.js index d2664ec..83639eb 100644 --- a/lib/wrench.js +++ b/lib/wrench.js @@ -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~'); -- 2.39.5