Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion frontend/common/providers/ConfigProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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() {
Expand Down
Loading