Fix: Winner gets resetted, if player gets removed from the game

This commit is contained in:
2026-03-07 17:03:52 +01:00
parent 664af7ffee
commit 4bcb10df81
2 changed files with 8 additions and 11 deletions

View File

@@ -315,6 +315,9 @@ class _CreateMatchViewState extends State<CreateMatchView> {
matchId: widget.match!.id,
playerId: player.id,
);
if (widget.match!.winner?.id == player.id) {
updatedMatch.winner = null;
}
}
}