fix: reload round data when navigating holes
Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
This commit is contained in:
1 parent
74769f057f
commit
ebf52f3443
1 file changed
+2
-8
+2
-8
@@ -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);
|
||||
}
|
||||
loadRound();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user