From b6b68f869740a42d286fd976afbff1cb912faa10 Mon Sep 17 00:00:00 2001 From: Rens Hamburger Date: Sun, 3 Nov 2019 09:07:20 +0100 Subject: [PATCH] Fix beamer --- src/services/ResultService.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/ResultService.js b/src/services/ResultService.js index ae523b6..32a7fcd 100644 --- a/src/services/ResultService.js +++ b/src/services/ResultService.js @@ -105,7 +105,7 @@ export class ResultService extends Service { if (count + block.crewCount > this.beginCount && count < this.endCount) { this.fields.push(block); this.fields[this.fields.length - 1].forEach(field => { - if (fieldCount + count > this.endCount) { + if (fieldCount + count > this.endCount && field.crewCount) { field.crews.teams.length = 0; } if (count < this.beginCount) { @@ -113,9 +113,10 @@ export class ResultService extends Service { field.crews.teams.splice(0, this.beginCount - count); } else { field.crews.teams.length = 0; + field.crewCount = 0; } } - if (count + field.crewCount + fieldCount > this.endCount) { + if ((count + field.crewCount + fieldCount > this.endCount) && field.crewCount) { field.crews.teams.length = Math.max(0, this.endCount - count - 1 - fieldCount); }