Skip to content

Commit

Permalink
style: Simplify.
Browse files Browse the repository at this point in the history
  • Loading branch information
vxern committed Sep 20, 2024
1 parent 70f2b68 commit 3a72a75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/library/services/dynamic-voice-channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class DynamicVoiceChannelService extends LocalService {
async #handleVoiceStateUpdate(newVoiceState: Logos.VoiceState): Promise<void> {
const oldVoiceState = this.oldVoiceStates.get(newVoiceState.userId);

if (oldVoiceState === undefined || oldVoiceState.channelId === undefined) {
if (oldVoiceState?.channelId === undefined) {
await this.#handleConnect(newVoiceState);
} else if (newVoiceState.channelId === undefined) {
await this.#handleDisconnect(oldVoiceState);
Expand Down

0 comments on commit 3a72a75

Please sign in to comment.