diff --git a/acorn/src/expression.js b/acorn/src/expression.js index 0d97dade6..de4ebd0c9 100644 --- a/acorn/src/expression.js +++ b/acorn/src/expression.js @@ -623,7 +623,7 @@ pp.parseObj = function(isPattern, refDestructuringErrors) { while (!this.eat(tt.braceR)) { if (!first) { this.expect(tt.comma) - if (this.afterTrailingComma(tt.braceR)) break + if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(tt.braceR)) break } else first = false const prop = this.parseProperty(isPattern, refDestructuringErrors)