Skip to content

Commit be78a3d

Browse files
committed
fixed 'error is not defined linter warning when using static/static-module and es6
1 parent e8dc6ce commit be78a3d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/verifier.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ function genVerifyValue(gen, field, fieldIndex, ref) {
3131
("}");
3232
} else {
3333
gen
34-
((gen.hasErrorVar ? "" : "var ") + "e=types[%i].verify(%s);", fieldIndex, ref)
35-
("if(e)")
36-
("return%j+e", field.name + ".");
37-
gen.hasErrorVar = true;
34+
("{")
35+
("var e=types[%i].verify(%s);", fieldIndex, ref)
36+
("if(e)")
37+
("return%j+e", field.name + ".")
38+
("}");
3839
}
3940
} else {
4041
switch (field.type) {

0 commit comments

Comments
 (0)