This commit is contained in:
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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user