protect for in loops with hasOwnProperty
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user