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:
parent
095221564f
commit
ef4ca57a6c
|
|
@ -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 ?? '👤'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue