Skip to content

fix: directly access globalThis in Minimap for adapter#1085

Merged
braedonsaunders merged 1 commit into
mainfrom
claude/fix-minimap-game-loop-XdUwG
Jan 28, 2026
Merged

fix: directly access globalThis in Minimap for adapter#1085
braedonsaunders merged 1 commit into
mainfrom
claude/fix-minimap-game-loop-XdUwG

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

Bypass getRenderStateAdapter() which may have stale code in code-split bundles. Instead, directly access globalThis with the adapter key.

The issue: each code-split bundle may have its own copy of getRenderStateAdapter() compiled at different times. The Minimap's bundle was accessing a different singleton instance.

Fix: const worldAdapter = globalThis['voidstrike_RenderStateWorldAdapter']

https://claude.ai/code/session_013SU8NkKifVUgpc4CLPcwL9

Bypass getRenderStateAdapter() which may have stale code in code-split
bundles. Instead, directly access globalThis with the adapter key.

The issue: each code-split bundle may have its own copy of
getRenderStateAdapter() compiled at different times. The Minimap's
bundle was accessing a different singleton instance.

Fix: const worldAdapter = globalThis['__voidstrike_RenderStateWorldAdapter__']

https://claude.ai/code/session_013SU8NkKifVUgpc4CLPcwL9
@braedonsaunders braedonsaunders merged commit 24697a3 into main Jan 28, 2026
2 of 4 checks passed
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