Open ud09 opened 8 years ago
Another code that causes error in _createLayersControl method: passing empty arrays instead of passing objects. []'s for baselayers and overlays should be replaced with {}s
var control;
if (defaults.controls.layers && isDefined(defaults.controls.layers.control)) {
control = defaults.controls.layers.control.apply(this, [[], [], controlOptions]);
} else {
control = new L.control.layers([], [], controlOptions);
}
Hi, similar to https://github.com/tombatossals/angular-leaflet-directive/issues/899 and https://github.com/tombatossals/angular-leaflet-directive/pull/884 extending Array.prototype, breaks the code when adding custom controls array.
It's better not to use "for in" to iterate over arrays.
Same error also occurs in angular-simple-logger.js
and iterating over _fns