From be78a3d9bc8d9618950c77f9e261b422670042ce Mon Sep 17 00:00:00 2001 From: Adrian Imboden Date: Wed, 14 Jun 2017 00:24:42 +0200 Subject: [PATCH] fixed 'error is not defined linter warning when using static/static-module and es6 --- src/verifier.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/verifier.js b/src/verifier.js index b5ddc29ad..d58e27abe 100644 --- a/src/verifier.js +++ b/src/verifier.js @@ -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) {