Revert "protect for in loops with hasOwnProperty"
This reverts commit e3cc96dbfb.
This commit is contained in:
@@ -128,9 +128,7 @@ OpenLayers.Rule = OpenLayers.Class({
|
||||
*/
|
||||
destroy: function() {
|
||||
for (var i in this.symbolizer) {
|
||||
if (this.symbolizer.hasOwnProperty(i)) {
|
||||
this.symbolizer[i] = null;
|
||||
}
|
||||
this.symbolizer[i] = null;
|
||||
}
|
||||
this.symbolizer = null;
|
||||
delete this.symbolizers;
|
||||
@@ -218,14 +216,12 @@ OpenLayers.Rule = OpenLayers.Class({
|
||||
options.symbolizer = {};
|
||||
var value, type;
|
||||
for(var key in this.symbolizer) {
|
||||
if (this.symbolizer.hasOwnProperty(key)) {
|
||||
value = this.symbolizer[key];
|
||||
type = typeof value;
|
||||
if(type === "object") {
|
||||
options.symbolizer[key] = OpenLayers.Util.extend({}, value);
|
||||
} else if(type === "string") {
|
||||
options.symbolizer[key] = value;
|
||||
}
|
||||
value = this.symbolizer[key];
|
||||
type = typeof value;
|
||||
if(type === "object") {
|
||||
options.symbolizer[key] = OpenLayers.Util.extend({}, value);
|
||||
} else if(type === "string") {
|
||||
options.symbolizer[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -237,4 +233,4 @@ OpenLayers.Rule = OpenLayers.Class({
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Rule"
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user