Revert "protect for in loops with hasOwnProperty"

This reverts commit e3cc96dbfb.
This commit is contained in:
Éric Lemoine
2012-03-03 22:35:39 +01:00
parent 161b54b6f1
commit 9a116b21b9
31 changed files with 267 additions and 386 deletions

View File

@@ -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"
});
});