From f3877152934c11d98538545fb91c95bf84f2d9aa Mon Sep 17 00:00:00 2001 From: Amjad Masad Date: Tue, 12 May 2015 13:20:36 -0700 Subject: [PATCH] Allow trailing commas in methods --- src/expression.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expression.js b/src/expression.js index 6b8e842e8d..b820a6bf64 100755 --- a/src/expression.js +++ b/src/expression.js @@ -635,7 +635,7 @@ pp.parseMethod = function(isGenerator, isAsync) { let node = this.startNode() this.initFunction(node, isAsync) this.expect(tt.parenL) - node.params = this.parseBindingList(tt.parenR, false, false) + node.params = this.parseBindingList(tt.parenR, false, this.options.features["es7.trailingFunctionCommas"]) if (this.options.ecmaVersion >= 6) { node.generator = isGenerator }