Avoid using inherited hasOwnProperty

Fix #1031
This commit is contained in:
Mihai Bazon
2016-04-07 13:15:28 +03:00
parent 98434258d0
commit 9317237372
3 changed files with 11 additions and 7 deletions

View File

@@ -2509,7 +2509,7 @@ merge(Compressor.prototype, {
if (self.undeclared() && !isLHS(self, compressor.parent())) {
var defines = compressor.option("global_defs");
if (defines && defines.hasOwnProperty(self.name)) {
if (defines && HOP(defines, self.name)) {
return make_node_from_constant(compressor, defines[self.name], self);
}
switch (self.name) {