Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

app: avoid loading config when going back to the welcome page

Saúl Ibarra Corretgéa2f8e156da1f
diff --git a/react/features/app/actions.js b/react/features/app/actions.js
index 6795a70513..2fd41a453a 100644
--- a/react/features/app/actions.js
+++ b/react/features/app/actions.js
@@ -81,16 +81,23 @@ export function appNavigate(uri: ?string) {
let config;
- try {
- config = await loadConfig(url);
- dispatch(storeConfig(baseURL, config));
- } catch (error) {
+ // Avoid (re)loading the config when there is no room.
+ if (!room) {
config = restoreConfig(baseURL);
+ }
+
+ if (!config) {
+ try {
+ config = await loadConfig(url);
+ dispatch(storeConfig(baseURL, config));
+ } catch (error) {
+ config = restoreConfig(baseURL);
- if (!config) {
- dispatch(loadConfigError(error, locationURL));
+ if (!config) {
+ dispatch(loadConfigError(error, locationURL));
- return;
+ return;
+ }
}
}