protect for in loops with hasOwnProperty
This commit is contained in:
@@ -135,7 +135,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
});
|
||||
this.filterToParams = function(filter, params) {
|
||||
return format.write(filter, params);
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
@@ -311,7 +311,9 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
|
||||
this.destroyRequest(response.priv);
|
||||
} else {
|
||||
for (var key in this.pendingRequests) {
|
||||
this.destroyRequest(this.pendingRequests[key]);
|
||||
if (this.pendingRequests.hasOwnProperty(key)) {
|
||||
this.destroyRequest(this.pendingRequests[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user