Do not crash if circlego is not enabled (#349)

This commit is contained in:
Gautier P 2020-12-02 20:53:02 +01:00
parent 779c720b7d
commit 5995e2e879
2 changed files with 15 additions and 13 deletions

View file

@ -59,7 +59,7 @@ BR.PoiMarkers = L.Control.extend({
this.drawButton.state(enable ? 'deactivate-poi' : 'activate-poi');
if (enable) {
this.routing.draw(false);
this.circlego.draw(false);
if (this.circlego) this.circlego.draw(false);
this.map.on('click', this.onMapClick, this);
L.DomUtil.addClass(this.map.getContainer(), 'pois-draw-enabled');
} else {