Skip to content

Commit be13f58

Browse files
committed
2 parents 5fd6b91 + 52fd503 commit be13f58

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

services/ng-map.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@
8888
var deleteMap = function(mapCtrl) {
8989
var len = Object.keys(mapControllers).length - 1;
9090
var mapId = mapCtrl.map.id || len;
91-
mapCtrl.map.controls.forEach(function(ctrl) {
92-
ctrl.clear();
93-
});
91+
if (typeof mapCtrl.map.controls != "undefined") {
92+
mapCtrl.map.controls.forEach(function(ctrl) {
93+
ctrl.clear();
94+
});
95+
}
9496
//delete mapCtrl.map;
9597
delete mapControllers[mapId];
9698
};

0 commit comments

Comments
 (0)