Skip to content

Commit

Permalink
Don't try to remove from container if container doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
olzraiti authored and fredericbonifas committed Mar 8, 2018
1 parent e0c8a2e commit 075823d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion leaflet.textpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},
Expand Down

0 comments on commit 075823d

Please sign in to comment.