Skip to content

Commit

Permalink
Check if sb null before calling setInVC (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
taahamahdi authored Mar 18, 2022
1 parent 42a1ffd commit fc291f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/structures/game_session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,10 @@ export default class GameSession {
* @param inVC - Whether the player is currently in the voice channel
*/
async setPlayerInVC(userID: string, inVC: boolean): Promise<void> {
if (!this.scoreboard) {
return;
}

if (
inVC &&
!this.scoreboard.getPlayerIDs().includes(userID) &&
Expand Down

0 comments on commit fc291f6

Please sign in to comment.