From ebf52f34436ac11eb13b08583b4da5a3a1da128d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Stach?= Date: Fri, 9 Oct 2026 23:08:26 +0200 Subject: [PATCH] fix: reload round data when navigating holes Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) --- frontend/app.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/app.js b/frontend/app.js index 951f9aa..9df85f3 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -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(); }); }