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

View File

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