mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
fix problem with updating spectator count
This commit is contained in:
@@ -99,8 +99,8 @@ export class Lobby {
|
||||
}
|
||||
});
|
||||
|
||||
this.socket.on(globals.EVENT_IDS.NEW_SPECTATOR, (spectator) => {
|
||||
this.stateBucket.currentGameState.spectators.push(spectator);
|
||||
this.socket.on(globals.EVENT_IDS.UPDATE_SPECTATORS, (updatedSpectatorList) => {
|
||||
this.stateBucket.currentGameState.spectators = updatedSpectatorList;
|
||||
SharedStateUtil.setNumberOfSpectators(
|
||||
this.stateBucket.currentGameState.spectators.length,
|
||||
document.getElementById('spectator-count')
|
||||
|
||||
Reference in New Issue
Block a user