Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
fix(model): update text should have a space if scoreUpdate is set
Browse files Browse the repository at this point in the history
Fixes #232
  • Loading branch information
Benjamin Reed committed Mar 18, 2021
1 parent ede49f3 commit 47ad618
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/model/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,15 @@ export class Game extends Entry {
}

public get updateText(): string {
let ret = '';
let ret = [];

if (this.lastUpdate) {
ret += this.lastUpdate.trim();
if (this.lastUpdate && this.lastUpdate.length > 0) {
ret.push(this.lastUpdate.trim());
}
if (this.scoreUpdate) {
ret += this.scoreUpdate.trim();
if (this.scoreUpdate && this.scoreUpdate.length > 0) {
ret.push(this.scoreUpdate.trim());
}

return ret;
return ret.join('\n');
}
}

0 comments on commit 47ad618

Please sign in to comment.