From 9b9cc6a818d4ccdbc560e3bc184fb6e0898a1667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20=C3=98rstad?= Date: Fri, 17 Apr 2020 14:57:38 +0200 Subject: [PATCH] Fixes --- backend/api/rounds.js | 4 ++-- backend/api/tournament.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/api/rounds.js b/backend/api/rounds.js index 0099185..53423a2 100644 --- a/backend/api/rounds.js +++ b/backend/api/rounds.js @@ -526,8 +526,8 @@ function roundcheck(client, tournament, roundid) { tourny = result.value; const game = tourny.games[ - (tourny.currentRound % tourny.games.length) - - 1 + (tourny.currentRound - 1) % + tourny.games.length ]; const date = new Date(); date.setTime( diff --git a/backend/api/tournament.js b/backend/api/tournament.js index 1a19561..4a34e49 100644 --- a/backend/api/tournament.js +++ b/backend/api/tournament.js @@ -510,10 +510,10 @@ function roundcheck(client, tournament) { if (result.value) { // If the tournament has more rounds left tourny = result.value; - const game = // Finds the next game of the round + const game = tourny.games[ - (tourny.currentRound % tourny.games.length) - - 1 + (tourny.currentRound - 1) % + tourny.games.length ]; const date = new Date(); date.setTime( -- GitLab