React state bug caused a Pangaea replay crash after a map prop changed
The developer of Last Thaw, a free browser strategy game, found a bug where replays of a Pangaea match crashed with a 'map pangaea is not loaded' error on a cold load. Earth ships in the main bundle while the Pangaea map data is fetched only when needed. The cause was a React component whose readiness state was initialized from the Earth default and not recomputed when the map prop later changed to Pangaea. As a result, the page rendered Pangaea content before that map's data had loaded, triggering the error. The developer noted that Pangaea matches worked normally and that only cold-loaded Pangaea replays were affected.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in