fix corner case in functions (#3900)

fixes #3899
This commit is contained in:
Alex Lam S.L
2020-05-15 11:03:56 +01:00
committed by GitHub
parent 5ef7060098
commit 8d81d264f4
2 changed files with 35 additions and 1 deletions

View File

@@ -4363,6 +4363,7 @@ merge(Compressor.prototype, {
} else if (compressor.option("functions")
&& !compressor.option("ie8")
&& var_defs.length == 1
&& sym.assignments == 0
&& def.value === def.name.fixed_value()
&& def.value instanceof AST_Function
&& !(def.value.name && def.value.name.definition().assignments)