Jofthomas commited on
Commit
1dbe962
·
1 Parent(s): 3d91239
Files changed (1) hide show
  1. 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.players.find((p) => p.human === oauthToken);
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
  }