Skip to content

Commit

Permalink
validate is a non-empty array after flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHenkel committed Feb 26, 2017
1 parent 11486e0 commit 6f2e47f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/helpers/normalizeArgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ function normalizeArgs(registry, args) {
return fn;
}

return map(flatten(args), getFunction);
var flattenArgs = flatten(args);
assert(flattenArgs.length, 'Arguments must be a non-empty array or string');

return map(flattenArgs, getFunction);
}

module.exports = normalizeArgs;

0 comments on commit 6f2e47f

Please sign in to comment.