Skip to content

fix(client): guard camera follow during map changes#315

Merged
RSamaium merged 2 commits into
v5from
fix/camera-follow-map-switch
Jun 25, 2026
Merged

fix(client): guard camera follow during map changes#315
RSamaium merged 2 commits into
v5from
fix/camera-follow-map-switch

Conversation

@RSamaium

Copy link
Copy Markdown
Owner

Summary

  • guard camera follow setup when a map switch leaves the followed sprite target unreadable or destroyed
  • wrap viewport follow targets so x/y reads fall back to the last known position after teardown
  • clear camera follow plugins on character unmount when this component previously installed follow
  • add regression tests and a patch changeset for @rpgjs/client

Fixes #314.

Validation

  • pnpm vitest packages/client/src/services/cameraFollow.spec.ts
  • pnpm --dir packages/client build

@mintlify

mintlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
rpgjs 🟢 Ready View Preview Jun 24, 2026, 10:19 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@RSamaium RSamaium force-pushed the fix/camera-follow-map-switch branch from 6f8f389 to 4f05c03 Compare June 24, 2026 13:23
@RSamaium RSamaium merged commit 4f05c03 into v5 Jun 25, 2026
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.

Map switch can crash client with Cannot read properties of null (reading 'x')

1 participant