Skip to content

Commit

Permalink
Merge pull request #5926 from adube/fix-map-collection-element-type
Browse files Browse the repository at this point in the history
Ensure correct type of event.element
  • Loading branch information
ahocevar committed Oct 2, 2016
2 parents da32e5e + 72e0ad1 commit 09eee4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ol/map.js
Expand Up @@ -442,7 +442,8 @@ ol.Map = function(options) {
* @param {ol.Collection.Event} event Collection event.
*/
function(event) {
var id = event.element.getId();
var overlay = /** @type {ol.Overlay} */ (event.element);
var id = overlay.getId();
if (id !== undefined) {
delete this.overlayIdIndex_[id.toString()];
}
Expand Down

0 comments on commit 09eee4a

Please sign in to comment.