diff --git a/react/features/app/actions.js b/react/features/app/actions.js index 8fa050e89..d70d6d6f6 100644 --- a/react/features/app/actions.js +++ b/react/features/app/actions.js @@ -30,7 +30,9 @@ export function appNavigate(uri: ?string) { * state. * @param {Object} newLocation - The location URI to navigate to. The value * cannot be undefined and is assumed to have all properties such as - * {@code host} and {@code room} defined values. + * {@code host}, {@code contextRoot}, and {@code room} defined. Depending on the + * property, it may have a value equal to {@code undefined} and that may be + * acceptable. * @private * @returns {void} */ @@ -55,8 +57,9 @@ function _appNavigateToMandatoryLocation( } /** - * Notifies that an attempt to load the config(uration) of domain has - * completed. + * Notifies that an attempt to load a config(uration) has completed. Due to + * the asynchronous native of the loading, the specified config may + * or may not be required by the time the notification arrives. * * @param {string|undefined} err - If the loading has failed, the error * detailing the cause of the failure. @@ -65,6 +68,10 @@ function _appNavigateToMandatoryLocation( * @returns {void} */ function configLoaded(err, config) { + // FIXME Due to the asynchronous native of the loading, the specified + // config may or may not be required by the time the notification + // arrives. + if (err) { // XXX The failure could be, for example, because of a // certificate-related error. In which case the connection will @@ -186,6 +193,7 @@ export function appWillUnmount(app) { * * @param {Object} location - The location URI which specifies the host to load * the config.js from. + * @private * @returns {Promise} */ function _loadConfig(location: Object) { diff --git a/react/features/base/lib-jitsi-meet/functions.js b/react/features/base/lib-jitsi-meet/functions.js index 81bdaccd9..6ac980afb 100644 --- a/react/features/base/lib-jitsi-meet/functions.js +++ b/react/features/base/lib-jitsi-meet/functions.js @@ -67,7 +67,7 @@ export function loadConfig(host: string, path: string = 'config.js') { .then(() => { const { config } = window; - // We don't want to pollute global scope. + // We don't want to pollute the global scope. window.config = undefined; if (typeof config !== 'object') { @@ -82,9 +82,9 @@ export function loadConfig(host: string, path: string = 'config.js') { throw err; }); } else { - // Return config.js file from global scope. We can't use the version - // that's being used for the React Native app because the old/current - // Web app uses config from the global scope. + // Return "the config.js file" from the global scope - that is how the + // Web app on both the client and the server was implemented before the + // React Native app was even conceived. promise = Promise.resolve(window.config); } diff --git a/react/features/base/util/loadScript.native.js b/react/features/base/util/loadScript.native.js index 56c9253ca..d7b2ddd0f 100644 --- a/react/features/base/util/loadScript.native.js +++ b/react/features/base/util/loadScript.native.js @@ -1,11 +1,10 @@ /** * Loads a script from a specific URL. React Native cannot load a JS * file/resource/URL via a