Skip to content

Commit

Permalink
Fix to generation of verify methods for bytes
Browse files Browse the repository at this point in the history
It’s just missing a bracket.
  • Loading branch information
jonathon-love committed Dec 11, 2016
1 parent 178525c commit 3e9d8ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function verify(message) {

// required or present fields
} else if (field.required || value !== undefined) {

if (reason = verifyValue(field, value)) // eslint-disable-line no-cond-assign
return reason;
}
Expand Down Expand Up @@ -172,7 +172,7 @@ function genVerifyValue(gen, field, fieldIndex, ref) {
("return%j", invalid(field, "string"));
break;
case "bytes": gen
("if(!(%s&&typeof %s.length==='number'||util.isString(%s))", ref, ref, ref)
("if(!(%s&&typeof %s.length==='number'||util.isString(%s)))", ref, ref, ref)
("return%j", invalid(field, "buffer"));
break;
default:
Expand Down

0 comments on commit 3e9d8ea

Please sign in to comment.