[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.
This commit is contained in:
Saúl Ibarra Corretgé 2017-02-20 10:36:46 +01:00
parent 538af01bf5
commit 5b6985fc5c
2 changed files with 4 additions and 2 deletions

View File

@ -307,8 +307,10 @@ export class AbstractApp extends Component {
// non-reactified parts of the code (conference.js for example).
// Don't use in the react code!!!
// FIXME: remove when the reactification is finished!
if (typeof APP !== 'undefined') {
APP.store = store;
}
}
return store;
}

View File

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