Skip to content

Commit 3e9d8ea

Browse files
committed
Fix to generation of verify methods for bytes
It’s just missing a bracket.
1 parent 178525c commit 3e9d8ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/verify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function verify(message) {
129129

130130
// required or present fields
131131
} else if (field.required || value !== undefined) {
132-
132+
133133
if (reason = verifyValue(field, value)) // eslint-disable-line no-cond-assign
134134
return reason;
135135
}
@@ -172,7 +172,7 @@ function genVerifyValue(gen, field, fieldIndex, ref) {
172172
("return%j", invalid(field, "string"));
173173
break;
174174
case "bytes": gen
175-
("if(!(%s&&typeof %s.length==='number'||util.isString(%s))", ref, ref, ref)
175+
("if(!(%s&&typeof %s.length==='number'||util.isString(%s)))", ref, ref, ref)
176176
("return%j", invalid(field, "buffer"));
177177
break;
178178
default:

0 commit comments

Comments
 (0)