diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-08-09 17:34:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 17:34:28 +0800 |
commit | cfebeb2f63929a9e1a73a606ff2bc9a75e380b28 (patch) | |
tree | f9e615bcc5c0a732bb80ae1a2ace1d5f7b609219 /lib/compress.js | |
parent | fc78423f1d9bfa10774a04563e37e130523bf46d (diff) | |
download | tracifyjs-cfebeb2f63929a9e1a73a606ff2bc9a75e380b28.tar.gz tracifyjs-cfebeb2f63929a9e1a73a606ff2bc9a75e380b28.zip |
fix corner case in `mangle` workaround for Safari (#3230)
fixes #3227
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index 08a22c54..9b6e3369 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -5758,9 +5758,10 @@ merge(Compressor.prototype, { if (fixed instanceof AST_Defun) { fixed._squeezed = true; fixed = make_node(AST_Function, fixed, fixed); + fixed.name = make_node(AST_SymbolLambda, fixed.name, fixed.name); } var value; - if (d.recursive_refs > 0 && fixed.name instanceof AST_SymbolDefun) { + if (d.recursive_refs > 0) { value = fixed.clone(true); var defun_def = value.name.definition(); var lambda_def = value.variables.get(value.name.name); |