From 7ebb71bba7ee66f7ce5cea04984f61a95d0aaa2c Mon Sep 17 00:00:00 2001 From: Tandashi <18377875+Tandashi@users.noreply.github.com> Date: Sat, 15 Jul 2023 12:05:20 +0200 Subject: [PATCH] fix: `currentRound` returns round with only `Locked` and `Completed` matches Closes #180 --- src/get.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/get.ts b/src/get.ts index 03ab0cb..980ca49 100644 --- a/src/get.ts +++ b/src/get.ts @@ -109,7 +109,7 @@ export class Get extends BaseGetter { const matchesByRound = helpers.splitBy(matches, 'round_id'); for (const roundMatches of matchesByRound) { - if (roundMatches.every(match => match.status >= Status.Completed)) + if (roundMatches.every((match) => !helpers.isMatchOngoing(match))) continue; const round = await this.storage.select('round', roundMatches[0].round_id);