diff --git a/frontend/common/providers/ConfigProvider.js b/frontend/common/providers/ConfigProvider.js index 104bf585406f..dce3fbfdb873 100644 --- a/frontend/common/providers/ConfigProvider.js +++ b/frontend/common/providers/ConfigProvider.js @@ -8,7 +8,7 @@ export default (WrappedComponent) => { super(props) this.state = { error: ConfigStore.error, - isLoading: ConfigStore.model ? ConfigStore.isLoading : true, + isLoading: ConfigStore.hasLoaded ? ConfigStore.isLoading : true, } ES6Component(this) } @@ -20,6 +20,14 @@ export default (WrappedComponent) => { isLoading: ConfigStore.isLoading, }) }) + // Re-sync: the store can finish loading before this subscription + // exists, and no further change event arrives to recover. + if (ConfigStore.hasLoaded || ConfigStore.error) { + this.setState({ + error: ConfigStore.error, + isLoading: ConfigStore.isLoading, + }) + } } render() {