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

@@ -71,7 +71,7 @@ function DEFNODE(type, props, methods, base) {
if (type) {
ctor.prototype.TYPE = ctor.TYPE = type;
}
if (methods) for (i in methods) if (methods.hasOwnProperty(i)) {
if (methods) for (i in methods) if (HOP(methods, i)) {
if (/^\$/.test(i)) {
ctor[i.substr(1)] = methods[i];
} else {