Skip to content

Commit

Permalink
Use regular ol' if instead of boolean operator in sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
mstade committed Dec 21, 2015
1 parent 2e57f22 commit ffa503a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/tape
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ if (typeof opts.require === 'string') {
}

opts.require.forEach(function(module) {
/* The `module &&` ensures we ignore `-r ""`, trailing `-r` or other
* silly things the user might (inadvertedly) be doing.
*/
module && require(resolveModule(module, { basedir: cwd }));
if (module) {
/* This check ensures we ignore `-r ""`, trailing `-r`, or
* other silly things the user might (inadvertedly) be doing. */
require(resolveModule(module, { basedir: cwd }));
}
});

opts._.forEach(function (arg) {
Expand Down

0 comments on commit ffa503a

Please sign in to comment.