improve handling of eval (#3776)

closes #3768
This commit is contained in:
Alex Lam S.L
2020-04-10 23:36:17 +01:00
committed by GitHub
parent dce9dfce0e
commit c810ecd081
5 changed files with 90 additions and 24 deletions

View File

@@ -996,9 +996,7 @@ merge(Compressor.prototype, {
function needs_unbinding(compressor, val) {
return val instanceof AST_PropAccess
|| compressor.has_directive("use strict")
&& is_undeclared_ref(val)
&& val.name == "eval";
|| is_undeclared_ref(val) && val.name == "eval";
}
// we shouldn't compress (1,func)(something) to