Skip to content

fix: use fresh RenderStateWorldAdapter singleton after Strict Mode reset#1098

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-game-load-error-gPbMG
Jan 28, 2026
Merged

fix: use fresh RenderStateWorldAdapter singleton after Strict Mode reset#1098
braedonsaunders merged 1 commit into
mainfrom
claude/fix-game-load-error-gPbMG

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

The renderStateAdapterRef was capturing the adapter instance at first render. After React Strict Mode cleanup reset the singleton and recreated it, worldProviderRef still pointed to the old cleared instance. Renderers were querying an empty adapter while the minimap (using getInstance() directly) worked correctly.

Now all usages call getInstance() directly to ensure we always get the current singleton instance.

https://claude.ai/code/session_013exv117UKR4KvEd1eXc2mT

The renderStateAdapterRef was capturing the adapter instance at first
render. After React Strict Mode cleanup reset the singleton and recreated
it, worldProviderRef still pointed to the old cleared instance. Renderers
were querying an empty adapter while the minimap (using getInstance()
directly) worked correctly.

Now all usages call getInstance() directly to ensure we always get the
current singleton instance.

https://claude.ai/code/session_013exv117UKR4KvEd1eXc2mT
@braedonsaunders braedonsaunders merged commit 8d2be28 into main Jan 28, 2026
3 of 4 checks passed
@braedonsaunders braedonsaunders deleted the claude/fix-game-load-error-gPbMG branch January 28, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants