fix corner case in hoist_props (#3947)

fixes #3945
This commit is contained in:
Alex Lam S.L
2020-06-02 16:51:06 +01:00
committed by GitHub
parent c97ad98f92
commit e2e4b7fb37
2 changed files with 26 additions and 0 deletions

View File

@@ -5074,6 +5074,9 @@ merge(Compressor.prototype, {
&& right.properties.length > 0
&& all(right.properties, function(prop) {
return prop instanceof AST_ObjectKeyVal;
})
&& all(def.references, function(ref) {
return ref.fixed_value() === right;
});
}
});