diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2019-12-30 09:10:06 +0100 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-12-30 20:46:13 +0100 |
commit | 4970319992a3edd076cd29e74a7b17fc1d2d7e40 (patch) | |
tree | 32383efca6aa9e8615f889daa07fdcd2506c6045 | |
parent | 8230b7f67c8f79f0c3ca0aef957fca10ee95959c (diff) | |
download | sonarqube-4970319992a3edd076cd29e74a7b17fc1d2d7e40.tar.gz sonarqube-4970319992a3edd076cd29e74a7b17fc1d2d7e40.zip |
Fix code's issues due to the new version of typescript
3 files changed, 8 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx index 42e67969a5c..2d16c895ac0 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx @@ -74,9 +74,13 @@ export default class App extends React.PureComponent<Props> { fetchQualityGates({ organization: component.organization }), getGateForProject({ organization: component.organization, project: component.key }) ]).then( - ([{ qualitygates: allGates }, gate]) => { + ([qualityGateList, gate]) => { if (this.mounted) { - this.setState({ allGates, gate, loading: false }); + this.setState({ + allGates: qualityGateList?.qualitygates, + gate, + loading: false + }); } }, () => { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx b/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx index 9d44317e85b..3b02d76077f 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx @@ -39,7 +39,7 @@ interface Props { optionClassName?: string; organization?: { key: string }; - getFacetValueForOption?: (facet: Facet, option: Option) => void; + getFacetValueForOption?: (facet: Facet, option: Option) => number; halfWidth?: boolean; highlightUnder?: number; diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx index e9a6f969069..8d7ac7492bd 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx @@ -81,7 +81,7 @@ export default class PRDecorationBinding extends React.PureComponent<Props, Stat const newFormData = originalData || formData; return { formData: newFormData, - instances, + instances: instances || [], isValid: this.validateForm(newFormData), loading: false, originalData |