[FIX] mail: prevent blocking datachannel access if one is unavailable
Before this commit, if one RTCDataChannel was not available, signaling using the RTDDataChannels was faulty. This commit fixes this issue by skipping unavailable dataChannels. closes odoo/odoo#76102 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -633,7 +633,7 @@ function factory(dependencies) {
|
||||
for (const token of targetTokens) {
|
||||
const dataChannel = this._dataChannels[token];
|
||||
if (!dataChannel || dataChannel.readyState !== 'open') {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
dataChannel.send(content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user