fix: reload round data when navigating holes

Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
This commit is contained in:
Jiří Stachandaider committed 2026-10-09 23:08:26 +02:00
1 parent 74769f057f
commit ebf52f3443
1 file changed
+3 -9
+3 -9
View File
@@ -119,21 +119,15 @@ function prevHole() {
if (currentIndex > 0) {
saveHole().then(() => {
currentIndex--;
const holes = currentData.holes.sort((a,b) => a.hole_number - b.hole_number);
renderHole(holes[currentIndex]);
renderNav(holes);
loadRound();
});
}
}
function nextHole() {
saveHole().then(() => {
const holes = currentData.holes.sort((a,b) => a.hole_number - b.hole_number);
if (currentIndex < holes.length - 1) {
currentIndex++;
renderHole(holes[currentIndex]);
renderNav(holes);
}
currentIndex++;
loadRound();
});
}