From 1904c96a996c1cba54e2fe7540447fcb031e00d3 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 9 Jan 2018 11:01:22 +0100 Subject: SONAR-10073 Impossible to set QP of a project from an organization that is not default --- .../js/apps/quality-profiles/components/App.tsx | 27 ++++++++++++++-------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/components/App.tsx') 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 { 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 = () => { -- cgit v1.2.3