leaflet-splitmap icon indicating copy to clipboard operation
leaflet-splitmap copied to clipboard

fix: layer.getContainer could return null

Open iisakkirotko opened this issue 1 year ago • 1 comments

If the layers have already been removed from the map before the control, layer.getContainer can return null. This would make the change in style throw, preventing the rest of the remove function from executing. By guarding against this, the control will now be correctly removed in both cases.

iisakkirotko avatar Nov 15 '24 09:11 iisakkirotko

this PR might be combined with https://github.com/QuantStack/leaflet-splitmap/pull/14

dfguerrerom avatar Jan 10 '25 01:01 dfguerrerom