Skip to content

Commit adebdf7

Browse files
Merge pull request #12 from odoo/master-safe-update-info-tso
[IMP] guard client bus calls
2 parents 563d3d7 + 867cd79 commit adebdf7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/client.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ export class SfuClient extends EventTarget {
224224
* @param {boolean} [param0.needRefresh] true if the server should refresh the local info from all sessions of this channel
225225
*/
226226
updateInfo(info, { needRefresh } = {}) {
227-
this._info = info;
228-
this._bus.send(
227+
this._bus?.send(
229228
{
230229
name: CLIENT_MESSAGE.INFO_CHANGE,
231230
payload: { info, needRefresh },
@@ -266,7 +265,7 @@ export class SfuClient extends EventTarget {
266265
if (!hasChanged) {
267266
return;
268267
}
269-
this._bus.send(
268+
this._bus?.send(
270269
{
271270
name: CLIENT_MESSAGE.CONSUMPTION_CHANGE,
272271
payload: { sessionId, states },

0 commit comments

Comments
 (0)