Skip to content

Commit

Permalink
Merge pull request #50 from Proteus-Eretes/beamer_opt
Browse files Browse the repository at this point in the history
FIxes
  • Loading branch information
RensHam authored Nov 3, 2019
2 parents df40866 + 02d5902 commit 69a52d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/BlockPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
const blocks = await this.resultService.update();
this.updateFields(blocks);
} catch (e) {
console.log(e);
this.updateFields(this.resultService.getLastRegattaData());
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/services/ResultService.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ 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 && field.crewCount) {
if ((fieldCount + count > this.endCount) && field.crewCount) {
field.crews.teams.length = 0;
}
if (count < this.beginCount) {
if (count + field.crewCount > this.beginCount) {
if ((count + field.crewCount > this.beginCount) && field.crewCount) {
field.crews.teams.splice(0, this.beginCount - count);
} else {
} else if (field.crewCount) {
field.crews.teams.length = 0;
field.crewCount = 0;
}
Expand Down

0 comments on commit 69a52d4

Please sign in to comment.