Skip to content

Commit

Permalink
Fix tournament featured game clock
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Dec 28, 2021
1 parent 60a5b94 commit aaab373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lichess/interfaces/tournament.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { FeaturedGame } from '.'
import { FeaturedGame2 } from '.'
import { ChatData } from './chat'
import { Opening } from './game'

export interface Tournament {
readonly chat?: ChatData
readonly clock: TournamentClock
readonly createdBy: string
featured?: FeaturedGame
featured?: FeaturedGame2
readonly fullName: string
readonly id: string
readonly isFinished: boolean
Expand Down
3 changes: 0 additions & 3 deletions src/ui/tournament/detail/TournamentCtrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ export default class TournamentCtrl {
if (data.featured && (!oldData || !oldData.featured || (data.featured.id !== oldData.featured.id))) {
this.socketIface.send('startWatching', data.featured.id)
}
else if (data.featured && (!oldData || !oldData.featured || (data.featured.id === oldData.featured.id))) {
data.featured = oldData.featured
}
this.tournament = { ...this.tournament, ...data, ...{ me: data.me } } // to account for removal on withdraw
this.setPageCache(data.standing)
if (this.pagesCache[this.page] !== undefined) {
Expand Down

0 comments on commit aaab373

Please sign in to comment.