Skip to content

Commit

Permalink
fixed new highscore when 0 points
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasrberg committed Jul 24, 2024
1 parent 89f2b65 commit 1cac71b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/game/game-result/game-result.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class GameResultComponent implements OnInit, OnDestroy {
if (Math.max(...todaysScores) > 0) {
this.todaysHighscore = Math.max(...todaysScores);
}
if (this.drawingService.totalScore >= this.todaysHighscore) {
if (this.drawingService.totalScore >= this.todaysHighscore && this.score > 0) {
this.newHighscore = true;
this.blowConfetti();
}
Expand Down

0 comments on commit 1cac71b

Please sign in to comment.