Permalink
Browse files

Add a precondition check for the args parameter.

  • Loading branch information...
1 parent 8fac80e commit bd667324ea256f2f513ff66a8be3b2696578b53e @MathieuTurcotte committed May 23, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/function_call.js
View
@@ -13,6 +13,7 @@ function FunctionCall(fn, args, callback) {
events.EventEmitter.call(this);
precond.checkIsFunction(fn, 'Expected fn to be a function.');
+ precond.checkIsArray(args, 'Expected args to be an array.');
precond.checkIsFunction(callback, 'Expected callback to be a function.');
this.function_ = fn;

0 comments on commit bd66732

Please sign in to comment.