This commit is contained in:
parent
9e17aaf043
commit
f5b5d8f337
@ -41,7 +41,7 @@ function getObjRef(node, nodes, file, scope) {
|
||||
function getPropRef(node, nodes, file, scope) {
|
||||
let prop = node.property;
|
||||
let key = t.toComputedKey(node, prop);
|
||||
if (t.isLiteral(key)) return key;
|
||||
if (t.isLiteral(key) && t.isPureish(key)) return key;
|
||||
|
||||
let temp = scope.generateUidIdentifierBasedOnNode(prop);
|
||||
nodes.push(t.variableDeclaration("var", [
|
||||
|
||||
@ -0,0 +1,2 @@
|
||||
var a, b;
|
||||
a[`${b++}`] **= 1;
|
||||
@ -0,0 +1,3 @@
|
||||
var a, b;
|
||||
var _ref = `${ b++ }`;
|
||||
a[_ref] = Math.pow(a[_ref], 1)
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-exponentiation-operator"]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user