From 3c417838a4504c6d29b4357d7abc8a3c6d88bd48 Mon Sep 17 00:00:00 2001 From: Miguel Alatzar Date: Mon, 10 Feb 2020 09:46:22 -0700 Subject: [PATCH] Dispatch loadConfigAndLicense on launchApp (#3902) --- app/mattermost.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/mattermost.js b/app/mattermost.js index 8e54c4232..612a2edde 100644 --- a/app/mattermost.js +++ b/app/mattermost.js @@ -8,7 +8,7 @@ import {Provider} from 'react-redux'; import {loadMe} from 'mattermost-redux/actions/users'; import {resetToChannel, resetToSelectServer} from 'app/actions/navigation'; -import {setDeepLinkURL} from 'app/actions/views/root'; +import {setDeepLinkURL, loadConfigAndLicense} from 'app/actions/views/root'; import {getAppCredentials} from 'app/init/credentials'; import emmProvider from 'app/init/emm_provider'; import 'app/init/device'; @@ -48,7 +48,8 @@ const launchApp = (credentials) => { ]); if (credentials) { - waitForHydration(store, () => { + waitForHydration(store, async () => { + await store.dispatch(loadConfigAndLicense()); store.dispatch(loadMe()); resetToChannel({skipMetrics: true}); });