[FIX] mail: fix "cannot read 'id' of undefined" in RTC calls

closes odoo/odoo#77371

X-original-commit: e2a2d9f17d7bf3b48ca45c5000547bb82dde3225
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
Samuel Degueldre
2021-09-28 21:02:36 +00:00
committed by Sébastien Theys
parent 567a09f58a
commit ecf5fbb4a8
+1 -1
View File
@@ -151,7 +151,7 @@ function factory(dependencies) {
if (!this.isClientRtcCompatible) {
return;
}
if (!this._peerConnections[sender] && (!channelId || channelId !== this.channel.id)) {
if (!this._peerConnections[sender] && (!channelId || !this.channel || channelId !== this.channel.id)) {
return;
}
switch (event) {