protect for in loops with hasOwnProperty
This commit is contained in:
@@ -163,12 +163,14 @@ OpenLayers.Tile.Image.IFrame = {
|
||||
field;
|
||||
|
||||
for(var par in params) {
|
||||
field = document.createElement('input');
|
||||
field.type = 'hidden';
|
||||
field.name = par;
|
||||
field.value = params[par];
|
||||
form.appendChild(field);
|
||||
}
|
||||
if (params.hasOwnProperty(par)) {
|
||||
field = document.createElement('input');
|
||||
field.type = 'hidden';
|
||||
field.name = par;
|
||||
field.value = params[par];
|
||||
form.appendChild(field);
|
||||
}
|
||||
}
|
||||
|
||||
return form;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user