Przeglądaj źródła

[RN] Fix use of undefined APP

On RN we don't use the global APP object, so don't save the store there unless
it's defined, which is the case in the current web version. Also, check for
undefined explicitly, since a "if (!APP)" check will throw a ReferenceError.
master
Saúl Ibarra Corretgé 8 lat temu
rodzic
commit
5b6985fc5c

+ 3
- 1
react/features/app/components/AbstractApp.js Wyświetl plik

307
             // non-reactified parts of the code (conference.js for example).
307
             // non-reactified parts of the code (conference.js for example).
308
             // Don't use in the react code!!!
308
             // Don't use in the react code!!!
309
             // FIXME: remove when the reactification is finished!
309
             // FIXME: remove when the reactification is finished!
310
-            APP.store = store;
310
+            if (typeof APP !== 'undefined') {
311
+                APP.store = store;
312
+            }
311
         }
313
         }
312
 
314
 
313
         return store;
315
         return store;

+ 1
- 1
react/features/base/conference/middleware.js Wyświetl plik

56
 
56
 
57
     // FIXME: workaround for the web version. Currently the creation of the
57
     // FIXME: workaround for the web version. Currently the creation of the
58
     // conference is handled by /conference.js
58
     // conference is handled by /conference.js
59
-    if (!APP) {
59
+    if (typeof APP === 'undefined') {
60
         store.dispatch(createConference());
60
         store.dispatch(createConference());
61
     }
61
     }
62
 
62
 

Ładowanie…
Anuluj
Zapisz