diff --git a/packages/babylon/src/parser/lval.js b/packages/babylon/src/parser/lval.js index 07e4db70db..cb8cae285a 100644 --- a/packages/babylon/src/parser/lval.js +++ b/packages/babylon/src/parser/lval.js @@ -120,8 +120,11 @@ pp.parseBindingAtom = function () { pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) { var elts = [], first = true; while (!this.eat(close)) { - if (first) first = false; - else this.expect(tt.comma); + if (first) { + first = false; + } else { + this.expect(tt.comma); + } if (allowEmpty && this.match(tt.comma)) { elts.push(null); } else if (allowTrailingComma && this.eat(close)) {