Просмотр исходного кода

[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.
efficient_tiling
Saúl Ibarra Corretgé 8 лет назад
Родитель
Сommit
5b6985fc5c
2 измененных файлов: 4 добавлений и 2 удалений
  1. 3
    1
      react/features/app/components/AbstractApp.js
  2. 1
    1
      react/features/base/conference/middleware.js

+ 3
- 1
react/features/app/components/AbstractApp.js Просмотреть файл

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 Просмотреть файл

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
 

Загрузка…
Отмена
Сохранить