aboutsummaryrefslogtreecommitdiff
path: root/lib/mozilla-ast.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-05-09 22:25:44 +0100
committerGitHub <noreply@github.com>2020-05-10 05:25:44 +0800
commit97728c4f0bb3a9fe3f135371deaa94afaad7921c (patch)
tree5bdf3a861db2696002cc09b4b4cffd14c8515e18 /lib/mozilla-ast.js
parentf74b7f74019e796c95c228dc6b0348f9db6e709f (diff)
downloadtracifyjs-97728c4f0bb3a9fe3f135371deaa94afaad7921c.tar.gz
tracifyjs-97728c4f0bb3a9fe3f135371deaa94afaad7921c.zip
improve AST validation (#3864)
Diffstat (limited to 'lib/mozilla-ast.js')
-rw-r--r--lib/mozilla-ast.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mozilla-ast.js b/lib/mozilla-ast.js
index 272e3e2a..1ce16921 100644
--- a/lib/mozilla-ast.js
+++ b/lib/mozilla-ast.js
@@ -111,7 +111,7 @@
var args = {
start : my_start_token(key),
end : my_end_token(M.value),
- key : key.type == "Identifier" ? key.name : key.value,
+ key : "" + key[key.type == "Identifier" ? "name" : "value"],
value : from_moz(M.value)
};
if (M.kind == "init") return new AST_ObjectKeyVal(args);