fix(complement-race): actually filter by isActive instead of just id

The previous fix attempted to filter by firstActivePlayer.id but was still
getting the first player with ANY id, not the first ACTIVE player.

The root cause was line 104 filtering by `p.id` (whether player has an ID)
instead of `p.isActive` (whether player is actually active).

Changes:
- Change filter from `(p) => p.id` to `(p) => p.isActive`
- Now correctly identifies the first active player
- Train shows only that player's passengers

This properly fixes the issue where inactive/disconnected players' passengers
were being displayed in the train cars.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-10-22 10:48:26 -05:00
parent 095221564f
commit ef4ca57a6c
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ export function SteamTrainJourney({
const { profile: _profile } = useUserProfile()
// Get the first active player's emoji
const activePlayers = Array.from(players.values()).filter((p) => p.id)
const activePlayers = Array.from(players.values()).filter((p) => p.isActive)
const firstActivePlayer = activePlayers[0]
const playerEmoji = firstActivePlayer?.emoji ?? '👤'