diff --git a/lib/6to5/generation/node/index.js b/lib/6to5/generation/node/index.js index 240036513e..68f6bc1f82 100644 --- a/lib/6to5/generation/node/index.js +++ b/lib/6to5/generation/node/index.js @@ -24,17 +24,14 @@ function Node(node, parent) { } Node.prototype.isUserWhitespacable = function () { - //var parent = this.parent; + var parent = this.parent; var node = this.node; - if (t.isUserWhitespacable(node)) { + if (t.isUserWhitespacable(node) || + t.isSequenceExpression(parent)) { return true; } - //if (t.isArrayExpression(parent)) { - // return true; - //} - return false; }; diff --git a/lib/6to5/types/alias-keys.json b/lib/6to5/types/alias-keys.json index 55a5af6e65..b2f4aef530 100644 --- a/lib/6to5/types/alias-keys.json +++ b/lib/6to5/types/alias-keys.json @@ -42,5 +42,6 @@ "ObjectPattern": ["Pattern"], "ArrayPattern": ["Pattern"], - "Property": ["UserWhitespacable"] + "Property": ["UserWhitespacable"], + "XJSElement": ["UserWhitespacable"] }