From 2b35ec7028284bcf9cc33e795fc30c366270a137 Mon Sep 17 00:00:00 2001 From: cilame Date: Sun, 24 Oct 2021 14:17:22 +0800 Subject: [PATCH] add --- tools/babel_asttool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/babel_asttool.js b/tools/babel_asttool.js index c473646..449a8b1 100644 --- a/tools/babel_asttool.js +++ b/tools/babel_asttool.js @@ -32302,7 +32302,7 @@ function FormatMember(path) { return; if(curNode.computed === undefined || !curNode.computed === true) return; - if (!/[a-zA-Z_$][0-9a-zA-Z_$]*/.test(curNode.property.value)) + if (!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(curNode.property.value)) return; curNode.property = t.identifier(curNode.property.value); curNode.computed = false;