Simplifying if condition

This commit is contained in:
David Négrier 2022-01-19 15:45:16 +01:00 committed by GitHub
parent 30811e7702
commit fd88399938
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();