aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-24 13:38:44 +0000
committerGitHub <noreply@github.com>2021-02-24 13:38:44 +0000
commita5a958beda5e0e7daedd5bd0cb4c72a81aade19b (patch)
tree99c04f4b16a8d0c42669bd377afb89fe664e1b78 /test
parentc88566034756eb17c4ff563901b3a1c95b63f788 (diff)
downloadtracifyjs-a5a958beda5e0e7daedd5bd0cb4c72a81aade19b.tar.gz
tracifyjs-a5a958beda5e0e7daedd5bd0cb4c72a81aade19b.zip
fix corner case in `comparisons` (#4680)
fixes #4679
Diffstat (limited to 'test')
-rw-r--r--test/compress/nullish.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/compress/nullish.js b/test/compress/nullish.js
index e8f5ad6c..a8526cac 100644
--- a/test/compress/nullish.js
+++ b/test/compress/nullish.js
@@ -109,3 +109,22 @@ conditional_assignment_4: {
expect_stdout: "PASS"
node_version: ">=14"
}
+
+issue_4679: {
+ options = {
+ comparisons: true,
+ ie8: true,
+ }
+ input: {
+ var a;
+ if (void 0 === (undefined ?? a))
+ console.log("PASS");
+ }
+ expect: {
+ var a;
+ if (void 0 === (undefined ?? a))
+ console.log("PASS");
+ }
+ expect_stdout: "PASS"
+ node_version: ">=14"
+}