Skip to content

Commit

Permalink
[Refactor] instead of throwing on undefined.forEach, throw explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jun 26, 2017
1 parent dd93216 commit b06f914
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/tape
Expand Up @@ -30,6 +30,10 @@ opts._.forEach(function (arg) {
// Note: `glob.sync` may throw an error and crash the node process.
var files = glob.sync(arg);

if (!Array.isArray(files)) {
throw new TypeError('unknown error: glob.sync did not return an array or throw. Please report this.');
}

files.forEach(function (file) {
require(resolvePath(cwd, file));
});
Expand Down

0 comments on commit b06f914

Please sign in to comment.