Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Commit

Permalink
copyDirSyncRecursive: Remove obsolete typeof check
Browse files Browse the repository at this point in the history
Variable `opts` is never undefined at this point because
of "opts = opts || {};".
  • Loading branch information
Krinkle committed Nov 14, 2013
1 parent 5c716f9 commit f76a05e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wrench.js
Original file line number Diff line number Diff line change
Expand Up @@ -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~');
Expand Down

0 comments on commit f76a05e

Please sign in to comment.