aboutsummaryrefslogtreecommitdiff
path: root/test/ufuzz
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-10-12 07:13:17 +0100
committerGitHub <noreply@github.com>2020-10-12 14:13:17 +0800
commitb512726cf39066919483d2add87905f677db1832 (patch)
tree6369b4e358af75e9c17de03107d4503091fc2d64 /test/ufuzz
parent9b7a13c8c7f06598b3da8da29da4e8e5680cd24e (diff)
downloadtracifyjs-b512726cf39066919483d2add87905f677db1832.tar.gz
tracifyjs-b512726cf39066919483d2add87905f677db1832.zip
fix corner case in `collapse_vars` (#4199)
fixes #4197
Diffstat (limited to 'test/ufuzz')
-rw-r--r--test/ufuzz/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js
index 717252d3..3e2d865d 100644
--- a/test/ufuzz/index.js
+++ b/test/ufuzz/index.js
@@ -1348,7 +1348,7 @@ for (var round = 1; round <= num_iterations; round++) {
ok = sandbox.same_stdout(sandbox.run_code(sort_globals(original_code)), sandbox.run_code(sort_globals(uglify_code)));
}
// ignore numerical imprecision caused by `unsafe_math`
- if (!ok && typeof uglify_result == "string" && o.compress && o.compress.unsafe_math) {
+ if (!ok && o.compress && o.compress.unsafe_math && typeof original_result == "string" && typeof uglify_result == "string") {
ok = fuzzy_match(original_result, uglify_result);
if (!ok) {
var fuzzy_result = sandbox.run_code(original_code.replace(/( - 0\.1){3}/g, " - 0.3"), toplevel);