set loose property assignments to computed if it's a literal
This commit is contained in:
parent
5bd75db0b6
commit
bf2418db66
@ -51,7 +51,7 @@ var loose = function (node, body, objId) {
|
|||||||
body.push(t.expressionStatement(
|
body.push(t.expressionStatement(
|
||||||
t.assignmentExpression(
|
t.assignmentExpression(
|
||||||
"=",
|
"=",
|
||||||
t.memberExpression(objId, prop.key, prop.computed),
|
t.memberExpression(objId, prop.key, prop.computed || t.isLiteral(prop.key)),
|
||||||
prop.value
|
prop.value
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user