diff --git a/squarenotsquare/src/realm/repos/ScoreRepo.js b/squarenotsquare/src/realm/repos/ScoreRepo.js index e4a202e..5050c80 100644 --- a/squarenotsquare/src/realm/repos/ScoreRepo.js +++ b/squarenotsquare/src/realm/repos/ScoreRepo.js @@ -28,7 +28,11 @@ export default class ScoreRepo { getHighScores = () => { let score = this.realmDB.objects(ScoreEntity.name).sorted('value', true); let highScores = []; + let i = 0; score.forEach((row) => { + if (i > 99){ + return highScores; + } highScores.push({user: row.user, value: row.value}); }); return highScores;