Skip to content

Commit

Permalink
fixed 'error is not defined linter warning when using static/static-m…
Browse files Browse the repository at this point in the history
…odule and es6
  • Loading branch information
adrianimboden committed Jun 13, 2017
1 parent e8dc6ce commit be78a3d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/verifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ function genVerifyValue(gen, field, fieldIndex, ref) {
("}");
} else {
gen
((gen.hasErrorVar ? "" : "var ") + "e=types[%i].verify(%s);", fieldIndex, ref)
("if(e)")
("return%j+e", field.name + ".");
gen.hasErrorVar = true;
("{")
("var e=types[%i].verify(%s);", fieldIndex, ref)
("if(e)")
("return%j+e", field.name + ".")
("}");
}
} else {
switch (field.type) {
Expand Down

0 comments on commit be78a3d

Please sign in to comment.