Skip to content

Commit

Permalink
Merge pull request #833 from adrianimboden/master
Browse files Browse the repository at this point in the history
fixed 'error' is not defined linter warning when using static/static-module and es6
  • Loading branch information
dcodeIO committed Jun 13, 2017
2 parents e8dc6ce + be78a3d commit c43243b
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 c43243b

Please sign in to comment.