Fix storm cards not flying to the storm: stop waiting on the one-shot map 'load' event
Publish Container / publish (push) Successful in 2m34s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Nate EmmertandClaude Sonnet 5.5 committed 2026-10-15 15:52:59 -04:00
1 parent fda8dca435
commit a185d10e1c
1 file changed
+3 -1
+3 -1
View File
@@ -174,7 +174,9 @@ async function flyToHurricane(storm) {
const map = mapsOverview.map;
if (!map) return;
if (!map.loaded()) await new Promise(resolve => map.once('load', resolve));
// 'load' fires only once per map, so waiting on it hangs forever whenever tiles are mid-load;
// flyTo works regardless, so just make sure the canvas has its real size first.
map.resize();
map.flyTo({ center: [lon, lat], zoom: 4, duration: 900 });