Skip to content

Commit

Permalink
fix: possible wrong ternimate rating parsing condition
Browse files Browse the repository at this point in the history
  • Loading branch information
exqt committed Dec 14, 2024
1 parent 7f62013 commit 435f734
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "donder-hiroba-plus",
"private": true,
"version": "0.2.9.2",
"version": "0.2.9.3",
"type": "module",
"scripts": {
"dev": "vite dev",
Expand Down
11 changes: 8 additions & 3 deletions src/components/Rating/RatingApp.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,18 @@
const nextPage = await getRecentScoreData(complete + 1)
// termniate condtion 1: no more data
let allSame = true
for (let i = 0; i < nextPage.length; i++) {
if (nextPage[i].songName === firstPage[i].songName &&
nextPage[i].difficulty === firstPage[i].difficulty
if (nextPage[i].songName !== firstPage[i].songName ||
nextPage[i].difficulty !== firstPage[i].difficulty
) {
shouldStop = true
allSame = false
break
}
}
if (allSame) {
shouldStop = true
}
// termniate condtion 2: no more plays
for (const item of nextPage) {
Expand Down

0 comments on commit 435f734

Please sign in to comment.