protect for in loops with hasOwnProperty

This commit is contained in:
Bart van den Eijnden
2012-02-29 18:43:55 +01:00
parent d7a3ecac08
commit e3cc96dbfb
31 changed files with 385 additions and 266 deletions
+3 -1
View File
@@ -423,7 +423,9 @@ OpenLayers.Layer = OpenLayers.Class({
getOptions: function() {
var options = {};
for(var o in this.options) {
options[o] = this[o];
if (this.options.hasOwnProperty(o)) {
options[o] = this[o];
}
}
return options;
},