Spaces:
Sleeping
Sleeping
Update src/components/PlayerDetails.tsx
Browse files
src/components/PlayerDetails.tsx
CHANGED
|
@@ -31,7 +31,7 @@ export default function PlayerDetails({
|
|
| 31 |
const oauthToken = oauth ? oauth.userInfo.fullname : undefined;
|
| 32 |
const humanTokenIdentifier = useQuery(api.world.userStatus, { worldId, oauthToken });
|
| 33 |
|
| 34 |
-
|
| 35 |
const humanPlayer = players.find((p) => p.human === humanTokenIdentifier);
|
| 36 |
const humanConversation = humanPlayer ? game.world.playerConversation(humanPlayer) : undefined;
|
| 37 |
// Always select the other player if we're in a conversation with them.
|
|
|
|
| 31 |
const oauthToken = oauth ? oauth.userInfo.fullname : undefined;
|
| 32 |
const humanTokenIdentifier = useQuery(api.world.userStatus, { worldId, oauthToken });
|
| 33 |
|
| 34 |
+
const players = [...game.world.players.values()];
|
| 35 |
const humanPlayer = players.find((p) => p.human === humanTokenIdentifier);
|
| 36 |
const humanConversation = humanPlayer ? game.world.playerConversation(humanPlayer) : undefined;
|
| 37 |
// Always select the other player if we're in a conversation with them.
|