Skip to content

Commit

Permalink
Merge pull request Longwelwind#1783 from gereon77/fix-undefined-notes
Browse files Browse the repository at this point in the history
Fix undefined notes
  • Loading branch information
gereon77 committed Jun 12, 2023
2 parents d2bab7c + f1d333c commit 245f993
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions agot-bg-game-server/src/server/serializedGameMigrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,19 @@ const serializedGameMigrations: {version: string; migrate: (serializeGamed: any)
serializedGame.childGameState.bannedUsers = [];
}

return serializedGame;
}
},
{
version: "108",
migrate: (serializedGame: any) => {
// Fix undefined notes
serializedGame.users.forEach((u: any) => {
if (u.note === undefined) {
u.note = "";
}
});

return serializedGame;
}
}
Expand Down

0 comments on commit 245f993

Please sign in to comment.