protect for in loops with hasOwnProperty
This commit is contained in:
@@ -122,7 +122,9 @@ OpenLayers.Format.WMC.v1_1_0 = OpenLayers.Class(
|
||||
// optional SRS element(s)
|
||||
if (context.srs) {
|
||||
for(var name in context.srs) {
|
||||
node.appendChild(this.createElementDefaultNS("SRS", name));
|
||||
if (context.srs.hasOwnProperty(name)) {
|
||||
node.appendChild(this.createElementDefaultNS("SRS", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user