From ecf5fbb4a8f2a3dc9b3b0fce14589d89635b5c1c Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Tue, 28 Sep 2021 11:19:37 +0000 Subject: [PATCH] [FIX] mail: fix "cannot read 'id' of undefined" in RTC calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes odoo/odoo#77371 X-original-commit: e2a2d9f17d7bf3b48ca45c5000547bb82dde3225 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/models/rtc/rtc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/models/rtc/rtc.js b/addons/mail/static/src/models/rtc/rtc.js index a16ccc5f279..bed80e939fa 100644 --- a/addons/mail/static/src/models/rtc/rtc.js +++ b/addons/mail/static/src/models/rtc/rtc.js @@ -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) {