diff --git a/front/src/WebRtc/VideoPeer.ts b/front/src/WebRtc/VideoPeer.ts index 60298681..022a67dc 100644 --- a/front/src/WebRtc/VideoPeer.ts +++ b/front/src/WebRtc/VideoPeer.ts @@ -261,7 +261,7 @@ export class VideoPeer extends Peer { this.closing = true; this.onBlockSubscribe.unsubscribe(); this.onUnBlockSubscribe.unsubscribe(); - if (this.newMessageSubscribtion) this.newMessageSubscribtion.unsubscribe(); + this.newMessageSubscribtion?.unsubscribe(); chatMessagesStore.addOutcomingUser(this.userId); if (this.localStreamStoreSubscribe) this.localStreamStoreSubscribe(); if (this.obtainedMediaConstraintStoreSubscribe) this.obtainedMediaConstraintStoreSubscribe();