diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-15 13:23:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-15 21:23:55 +0800 |
commit | 549de028b664d565b237ab2c4f79c5ae2f64b1ad (patch) | |
tree | 6a37a21eaa94d931bb72e64c409841f940b3c54a /lib | |
parent | f579f1aa47a0ba13955433b90b56bea241849f83 (diff) | |
download | tracifyjs-549de028b664d565b237ab2c4f79c5ae2f64b1ad.tar.gz tracifyjs-549de028b664d565b237ab2c4f79c5ae2f64b1ad.zip |
fix corner case in `objects` (#4381)
fixes #4380
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 3e70f2eb..fb5bcb74 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -10118,6 +10118,7 @@ merge(Compressor.prototype, { } if (found && !generated && typeof key == "string" && /^[0-9]+$/.test(key)) { generated = true; + if (keys.has(key)) prop = keys.get(key)[0]; prop.key = make_node(AST_Number, prop, { value: +key }); |