Stop racing hydration with a 404 — render the logo URL that actually exists

Fixkamolos
Ya
18 Mei 2026, 05:01 UTC
Mwandishi
Kamo
Ahadi ya
3204436

The tenant MinIO bucket holds logo-full.svg / logo.svg as canonical names; nobody uploads the -on-dark variants. We were trying the dark-mode URL first, 404'ing in the browser before React hydration attached the onError handler, then sitting on a broken-image because the load event had already fired and been lost. Drop the -on-dark probe so the first src is the real URL, and add a mount-time check: if the SSR-rendered img is already complete with naturalWidth=0, advance the candidate index — covers any future case where the first URL legitimately fails before hydration.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei