From fd8839993874f5f07d8e333b17648cf5a34f6e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 19 Jan 2022 15:45:16 +0100 Subject: [PATCH] Simplifying if condition --- front/src/WebRtc/VideoPeer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();