From f5b9c5d005e44b756fc4c5dc28e61c0bbed393eb Mon Sep 17 00:00:00 2001 From: Mika Dede Date: Tue, 28 Sep 2021 16:44:33 +0200 Subject: [PATCH] score: fix scrolling in correction mode --- apps/score/score.app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/score/score.app.js b/apps/score/score.app.js index 072617e6b..357cd965b 100644 --- a/apps/score/score.app.js +++ b/apps/score/score.app.js @@ -186,7 +186,7 @@ function matchWon(player) { } function matchEnded() { - return matchWon(0) || matchWon(1); + return (matchWon(0) || matchWon(1)) && cSet > (setsWon(0) + setsWon(1) - 1); } function matchScore(player) { @@ -207,17 +207,17 @@ function updateCurrentSet(val) { } setFirstShownSet(); - if (matchEnded()) { - firstShownSet = 0; - } - if (val > 0) { scores[cSet][2] = getTime(); + + if (matchEnded()) { + firstShownSet = 0; + } } } function score(player) { - if (!matchEnded() || correctionMode) { + if (!matchEnded()) { setFirstShownSet(); }