diff --git a/src/layer/Layer.Label.js b/src/layer/Layer.Label.js index d1bd96d7..b4a7cab7 100644 --- a/src/layer/Layer.Label.js +++ b/src/layer/Layer.Label.js @@ -101,7 +101,9 @@ L.Layer.include({ // open the label on the map this._map.openLabel(this._label, latlng); - if (this._label.options.interactive) { + // Label container may not be defined if not permanent and never + // opened. + if (this._label.options.interactive && this._label._container) { L.DomUtil.addClass(this._label._container, 'leaflet-clickable'); this.addInteractiveTarget(this._label._container); }