Allow trailing commas in methods
This commit is contained in:
parent
462ff572b3
commit
0452e0fdd2
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user