Skip to content

Commit

Permalink
Patch to fix destroy() being called on an undefined object
Browse files Browse the repository at this point in the history
  • Loading branch information
dracic committed Jan 7, 2016
1 parent cd01ae2 commit 52079ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/OpenLayers/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,9 @@ OpenLayers.Map = OpenLayers.Class({

if (this.controls != null) {
for (var i = this.controls.length - 1; i>=0; --i) {
this.controls[i].destroy();
if(this.controls[i] != undefined) {
this.controls[i].destroy();
}
}
this.controls = null;
}
Expand Down

0 comments on commit 52079ac

Please sign in to comment.