Wait for hydration before app launch (#4523)

This commit is contained in:
Elias Nahum 2020-07-02 16:03:45 -04:00 committed by GitHub
parent c22d5e69f6
commit 4ff9cd024a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,8 +56,8 @@ const launchApp = (credentials) => {
]);
const store = Store.redux;
if (credentials) {
waitForHydration(store, async () => {
waitForHydration(store, async () => {
if (credentials) {
const {previousVersion} = store.getState().app;
const valid = validatePreviousVersion(previousVersion);
if (valid) {
@ -69,10 +69,10 @@ const launchApp = (credentials) => {
captureJSException(error, false, store);
store.dispatch(logout());
}
});
} else {
resetToSelectServer(emmProvider.allowOtherServers);
}
} else {
resetToSelectServer(emmProvider.allowOtherServers);
}
});
telemetry.startSinceLaunch(['start:splash_screen']);
EphemeralStore.appStarted = true;