use typeof operand instead of object#hasOwnProperty

This commit is contained in:
Dan Hansen 2011-04-22 20:02:54 -05:00
parent 605382a478
commit d28e7e70b8

View file

@ -31,8 +31,7 @@
this.initialized = true;
for(var widgetId in this.collection) {
if(this.collection[widgetId].hasOwnProperty("start")
|| this.collection[widgetId].__proto__.hasOwnProperty("start")) {
if(typeof this.collection[widgetId].start !== "undefined") {
this.collection[widgetId].start();
}
}