We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5fd6b91 + 52fd503 commit be13f58Copy full SHA for be13f58
services/ng-map.js
@@ -88,9 +88,11 @@
88
var deleteMap = function(mapCtrl) {
89
var len = Object.keys(mapControllers).length - 1;
90
var mapId = mapCtrl.map.id || len;
91
- mapCtrl.map.controls.forEach(function(ctrl) {
92
- ctrl.clear();
93
- });
+ if (typeof mapCtrl.map.controls != "undefined") {
+ mapCtrl.map.controls.forEach(function(ctrl) {
+ ctrl.clear();
94
+ });
95
+ }
96
//delete mapCtrl.map;
97
delete mapControllers[mapId];
98
};
0 commit comments