Skip to content

Commit

Permalink
Don't hardcode .fn check.
Browse files Browse the repository at this point in the history
  • Loading branch information
yhahn committed Jul 14, 2014
1 parent 8ac7200 commit 53d256e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function value(key, val, constants, ref, spec, errors) {
if (!valid) sub.forEach(function(err) { errors.push(err); });
return valid;
// Val is a function.
} else if (spec.function && typeof val === 'object' && val.fn) {
} else if (spec.function && typeof val === 'object' && !Array.isArray(val)) {
return value(key, val, constants, ref, ref.function, errors);
// Val must be one of enumerated values.
} else if (spec.type === 'enum') {
Expand Down

0 comments on commit 53d256e

Please sign in to comment.