Skip to content

fix: ensure MapContainer receives forwarded ref#75

Merged
fityannugroho merged 1 commit intomainfrom
fix-map-ref
Aug 25, 2025
Merged

fix: ensure MapContainer receives forwarded ref#75
fityannugroho merged 1 commit intomainfrom
fix-map-ref

Conversation

@fityannugroho
Copy link
Owner

@fityannugroho fityannugroho commented Aug 25, 2025

Summary

This pull request fixes a regression where the map's forwarded ref was not properly passed through components/Map.tsx, which caused downstream consumers relying on the mapRef to fail (e.g. fly-to/bounds operations and map resize handler).

What I changed

  • Ensure the MapContainer receives the forwarded ref so external code can access the Leaflet map instance reliably.
  • Small defensive change so map initialization is more robust during client hydration.

Root cause

  • The regression was introduced by changes in PR Upgrade deps (React 19, etc.) and refactoring #59 which modified component initialization/prop handling and indirectly surfaced the missing ref forwarding in components/Map.tsx. This PR corrects that by forwarding the ref to MapContainer.

@fityannugroho fityannugroho changed the title fix: ensure MapContainer receives forwarded ref (fix-map-ref → main) fix: ensure MapContainer receives forwarded ref Aug 25, 2025
@fityannugroho fityannugroho added the bug Something isn't working label Aug 25, 2025
@fityannugroho fityannugroho merged commit 168c5f8 into main Aug 25, 2025
6 checks passed
@fityannugroho fityannugroho deleted the fix-map-ref branch August 25, 2025 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant