From c589aeb60a7c4bc21b8e3313432b32133583075a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 23 May 2019 10:17:42 +0200 Subject: [PATCH] app: avoid loading config when going back to the welcome page --- react/features/app/actions.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/react/features/app/actions.js b/react/features/app/actions.js index 6795a7051..2fd41a453 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) { - dispatch(loadConfigError(error, locationURL)); + if (!config) { + try { + config = await loadConfig(url); + dispatch(storeConfig(baseURL, config)); + } catch (error) { + config = restoreConfig(baseURL); - return; + if (!config) { + dispatch(loadConfigError(error, locationURL)); + + return; + } } }