fix computed properties in es7 object rest/spread - thanks @AluisioASG!

This commit is contained in:
Sebastian McKenzie
2015-04-05 02:52:14 +10:00
parent dc98ac7c93
commit 320a39f4c4
3 changed files with 4 additions and 1 deletions

View File

@@ -332,7 +332,7 @@ class DestructuringTransformer {
if (t.isSpreadProperty(prop)) continue;
var key = prop.key;
if (t.isIdentifier(key)) key = t.literal(prop.key.name);
if (t.isIdentifier(key) && !prop.computed) key = t.literal(prop.key.name);
keys.push(key);
}