fix migration
All checks were successful
deploy / deploy (push) Successful in 1m3s

This commit is contained in:
Lee 2023-10-22 08:52:14 +01:00
parent a8139676b8
commit b475ae1d66

@ -232,11 +232,14 @@ export const usePlayerScoresStore = create<PlayerScoresStore>()(
migrate: (state: any, version: number) => { migrate: (state: any, version: number) => {
if (version == 1) { if (version == 1) {
console.log("Migrating player scores..."); state.players = state.players.map((player: any) => {
const players = state.players; return {
for (const player of players) { id: player.id,
player.scores = player.scores.scoresaber; scores: {
} scoresaber: player.scores,
},
};
});
return state; return state;
} }