mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
ac23773352
The journey map sets its first view on a rAF after the build, and the active entry asks for its pan on a 50 ms timer. In a background tab, or on a slow frame, the timer wins. Leaflet does not refuse a pan on a viewless map, it takes it as the first view with the zoom still undefined: the tile layer aborts its own add on that, the load event stops halfway, and every entry marker queued behind it never reaches the map. The catch that was meant for this never fired, because nothing threw. The next rebuild, after any save on the page, then tore down markers that were never added and died in Leaflet's icon removal, and the error boundary took the whole journey page with it. Both pans go through whenReady now: at once on a map with a view, otherwise right after the fit lands.