From 0c44f6c5b1d0cab5dc41206bacfe0ce444255289 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Thu, 11 Aug 2022 18:27:41 -0500 Subject: [PATCH] fix an issue where local score cache was resized incorrectly --- squarenotsquare/src/realm/repos/ScoreRepo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squarenotsquare/src/realm/repos/ScoreRepo.js b/squarenotsquare/src/realm/repos/ScoreRepo.js index 9138270..41e75a0 100644 --- a/squarenotsquare/src/realm/repos/ScoreRepo.js +++ b/squarenotsquare/src/realm/repos/ScoreRepo.js @@ -15,7 +15,7 @@ export default class ScoreRepo { this.scoreCache.sort((a, b) => b.value - a.value); if (this.scoreCache.length > 99) { - this.scoreCache = this.scoreCache.slice(99, this.scoreCache.length - 1); + this.scoreCache = this.scoreCache.slice(0, 100); } }