aboutsummaryrefslogtreecommitdiff
path: root/lib/transform.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-11-08 15:38:32 +0000
committerGitHub <noreply@github.com>2020-11-08 23:38:32 +0800
commit91fc1c82b56986df51ad1450c18718bc585deca9 (patch)
treea534652eea79949356bee8a877b71a49a5b18e82 /lib/transform.js
parent810cd40356f6fa1ddbc9c97a0df95bd1d94a2720 (diff)
downloadtracifyjs-91fc1c82b56986df51ad1450c18718bc585deca9.tar.gz
tracifyjs-91fc1c82b56986df51ad1450c18718bc585deca9.zip
support computed property name in object literal (#4268)
Diffstat (limited to 'lib/transform.js')
-rw-r--r--lib/transform.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/transform.js b/lib/transform.js
index 13598ea1..4aeb0f02 100644
--- a/lib/transform.js
+++ b/lib/transform.js
@@ -164,6 +164,7 @@ TreeTransformer.prototype = new TreeWalker;
self.properties = do_list(self.properties, tw);
});
DEF(AST_ObjectProperty, function(self, tw) {
+ if (self.key instanceof AST_Node) self.key = self.key.transform(tw);
self.value = self.value.transform(tw);
});
})(function(node, descend) {