Selaa lähdekoodia

fix(conference.js): crash on undefined

While on the prejoin screen, the local tracks are managed by the redux store and not conference.js, so localAudio is undefined.
master
Pawel Domas 4 vuotta sitten
vanhempi
commit
7c90f75ec9
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      conference.js

+ 2
- 2
conference.js Näytä tiedosto

@@ -2248,7 +2248,7 @@ export default {
2248 2248
                     return this.useAudioStream(stream);
2249 2249
                 })
2250 2250
                 .then(() => {
2251
-                    if (hasDefaultMicChanged) {
2251
+                    if (this.localAudio && hasDefaultMicChanged) {
2252 2252
                         // workaround for the default device to be shown as selected in the
2253 2253
                         // settings even when the real device id was passed to gUM because of the
2254 2254
                         // above mentioned chrome bug.
@@ -2588,7 +2588,7 @@ export default {
2588 2588
                                     // Use the new stream or null if we failed to obtain it.
2589 2589
                                     return useStream(tracks.find(track => track.getType() === mediaType) || null)
2590 2590
                                         .then(() => {
2591
-                                            if (hasDefaultMicChanged) {
2591
+                                            if (this.localAudio && hasDefaultMicChanged) {
2592 2592
                                                 // workaround for the default device to be shown as selected in the
2593 2593
                                                 // settings even when the real device id was passed to gUM because of
2594 2594
                                                 // the above mentioned chrome bug.

Loading…
Peruuta
Tallenna