Skip to content

Commit

Permalink
Merge pull request #49 from Proteus-Eretes/beamer_opt
Browse files Browse the repository at this point in the history
Fix beamer
  • Loading branch information
RensHam authored Nov 3, 2019
2 parents 1c713c2 + b6b68f8 commit df40866
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/ResultService.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,18 @@ 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) {
if (count + field.crewCount > this.beginCount) {
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);
}

Expand Down

0 comments on commit df40866

Please sign in to comment.