headless-studio / leptos-leaflet

MIT License
22 stars 14 forks source link

Fix panic when Popup and Tooltip are used within overlay context, eg. Polygon #29

Closed emirror-de closed 2 months ago

emirror-de commented 2 months ago

When using Popup and Tooltip in an overlay context, like a Polygon, the map context seems not to be available. Expecting the map context leads to a panic in this case.

This PR fixes this behavior by moving the expect method further down to the place where it is really requested. In addition to that, it removes the map context as requirement from the overlay context path.

dgsantana commented 2 months ago

Thank you, and nice catch. Merging.