diff --git a/leaflet.textpath.js b/leaflet.textpath.js index f629388..0f22be2 100755 --- a/leaflet.textpath.js +++ b/leaflet.textpath.js @@ -21,7 +21,7 @@ var PolylineTextPath = { onRemove: function (map) { map = map || this._map; - if (map && this._textNode) + if (map && this._textNode && map._renderer._container) map._renderer._container.removeChild(this._textNode); __onRemove.call(this, map); },