소스 검색

[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é 9 년 전
부모
커밋
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,7 +307,9 @@ export class AbstractApp extends Component {
307 307
             // non-reactified parts of the code (conference.js for example).
308 308
             // Don't use in the react code!!!
309 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 315
         return store;

+ 1
- 1
react/features/base/conference/middleware.js 파일 보기

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

Loading…
취소
저장