fix corner case in properties (#4889)

fixes #4888
This commit is contained in:
Alex Lam S.L
2021-05-01 00:52:53 +01:00
committed by GitHub
parent df980db4a8
commit 8bbfaacdae
2 changed files with 18 additions and 0 deletions

View File

@@ -11533,6 +11533,7 @@ merge(Compressor.prototype, {
AST_PropAccess.DEFMETHOD("flatten_object", function(key, compressor) {
if (!compressor.option("properties")) return;
if (key === "__proto__") return;
var expr = this.expression;
if (expr instanceof AST_Object) {
var props = expr.properties;