fix a bug where it would clear the scores db
All checks were successful
deploy / deploy (push) Successful in 56s
All checks were successful
deploy / deploy (push) Successful in 56s
This commit is contained in:
parent
cc1b6d9a63
commit
abaf378511
@ -133,13 +133,10 @@ export const useScoresaberScoresStore = create<ScoreSaberScoresStore>()(
|
||||
}
|
||||
|
||||
if (mostRecentScoreId) {
|
||||
// remove the old score
|
||||
const oldScoreIndex = oldScores.findIndex(
|
||||
(score) => score.score.id == score.score.id,
|
||||
// remove the score if it already exists
|
||||
oldScores = oldScores.filter(
|
||||
(oldScore) => oldScore.score.id != score.score.id,
|
||||
);
|
||||
if (oldScoreIndex != -1) {
|
||||
oldScores = oldScores.splice(oldScoreIndex, 1);
|
||||
}
|
||||
}
|
||||
oldScores.push({
|
||||
score: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user