Ver código fonte

fix(base/conference/reducer): check if room is defined

This was hit on a corner case when ConnectionService will deny
the request to start the call. I am not sure, but it could have been
that the conference object has been disposed or closed or something
else, but the fact is that 'conference.room' was not defined and things
crashed. It is not safe to access conference's private field 'room'. It
is true JitsiConference doesn't follow the practice of marking this
field as private with the underscore '_', but it is not a public field.
master
paweldomas 6 anos atrás
pai
commit
033aa0dd6e
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2
    1
      react/features/base/conference/reducer.js

+ 2
- 1
react/features/base/conference/reducer.js Ver arquivo

@@ -213,7 +213,8 @@ function _conferenceJoined(state, { conference }) {
213 213
     // i.e. password-protected is private to lib-jitsi-meet. However, the
214 214
     // library does not fire LOCK_STATE_CHANGED upon joining a JitsiConference
215 215
     // with a password.
216
-    const locked = conference.room.locked ? LOCKED_REMOTELY : undefined;
216
+    // FIXME Technically JitsiConference.room is a private field.
217
+    const locked = conference.room && conference.room.locked ? LOCKED_REMOTELY : undefined;
217 218
 
218 219
     return assign(state, {
219 220
         authRequired: undefined,

Carregando…
Cancelar
Salvar