diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx index fda9bb7ed26..661d0b4b3e7 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx @@ -60,17 +60,24 @@ export default class App extends React.PureComponent<Props, State> { loadData() { this.setState({ loading: true }); - Promise.all([getExporters(), this.fetchProfiles()]).then(responses => { - if (this.mounted) { - const [exporters, profilesResponse] = responses; - this.setState({ - actions: profilesResponse.actions, - exporters, - profiles: sortProfiles(profilesResponse.profiles), - loading: false - }); + Promise.all([getExporters(), this.fetchProfiles()]).then( + responses => { + if (this.mounted) { + const [exporters, profilesResponse] = responses; + this.setState({ + actions: profilesResponse.actions, + exporters, + profiles: sortProfiles(profilesResponse.profiles), + loading: false + }); + } + }, + () => { + if (this.mounted) { + this.setState({ loading: false }); + } } - }); + ); } updateProfiles = () => { |