Spaces:
Sleeping
Sleeping
try
Browse files- convex/world.ts +1 -1
convex/world.ts
CHANGED
|
@@ -192,7 +192,7 @@ export const leaveWorld = mutation({
|
|
| 192 |
throw new Error(`Invalid world ID: ${args.worldId}`);
|
| 193 |
}
|
| 194 |
// const existingPlayer = world.players.find((p) => p.human === tokenIdentifier);
|
| 195 |
-
const existingPlayer = world.
|
| 196 |
if (!existingPlayer) {
|
| 197 |
return;
|
| 198 |
}
|
|
|
|
| 192 |
throw new Error(`Invalid world ID: ${args.worldId}`);
|
| 193 |
}
|
| 194 |
// const existingPlayer = world.players.find((p) => p.human === tokenIdentifier);
|
| 195 |
+
const existingPlayer = world.playersInit.find((p) => p.human === oauthToken);
|
| 196 |
if (!existingPlayer) {
|
| 197 |
return;
|
| 198 |
}
|