fix a bug where it would clear the scores db
All checks were successful
deploy / deploy (push) Successful in 56s

This commit is contained in:
Lee 2023-10-23 16:30:53 +01:00
parent cc1b6d9a63
commit abaf378511

@ -133,13 +133,10 @@ export const useScoresaberScoresStore = create<ScoreSaberScoresStore>()(
} }
if (mostRecentScoreId) { if (mostRecentScoreId) {
// remove the old score // remove the score if it already exists
const oldScoreIndex = oldScores.findIndex( oldScores = oldScores.filter(
(score) => score.score.id == score.score.id, (oldScore) => oldScore.score.id != score.score.id,
); );
if (oldScoreIndex != -1) {
oldScores = oldScores.splice(oldScoreIndex, 1);
}
} }
oldScores.push({ oldScores.push({
score: { score: {