fix corner cases in join_vars (#3790)

fixes #3789
fixes #3791
This commit is contained in:
Alex Lam S.L
2020-04-17 19:53:26 +01:00
committed by GitHub
parent 15a3ebd467
commit da68ec6e19
4 changed files with 140 additions and 9 deletions

View File

@@ -1156,7 +1156,7 @@ for (var round = 1; round <= num_iterations; round++) {
uglify_code = uglify_code.code;
uglify_result = sandbox.run_code(uglify_code, toplevel);
ok = sandbox.same_stdout(original_result, uglify_result);
if (!ok && typeof uglify_result == "string" && o.compress.unsafe_math) {
if (!ok && typeof uglify_result == "string" && o.compress && o.compress.unsafe_math) {
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);