]> source.dussan.org Git - sonarqube.git/commitdiff
Fix code's issues due to the new version of typescript
authorPhilippe Perrin <philippe.perrin@sonarsource.com>
Mon, 30 Dec 2019 08:10:06 +0000 (09:10 +0100)
committerSonarTech <sonartech@sonarsource.com>
Mon, 30 Dec 2019 19:46:13 +0000 (20:46 +0100)
server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx
server/sonar-web/src/main/js/apps/projects/filters/Filter.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx

index 42e67969a5c7f761a6ead3c9c12d49e5540a0fdf..2d16c895ac0f59c654cb4d5f1acb0b02d6460f9c 100644 (file)
@@ -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
+          });
         }
       },
       () => {
index 9d44317e85b3ff8c7eaa2417fa046cfbb325b8e8..3b02d76077f50e0857d93901bb1bdce0bdc94d3e 100644 (file)
@@ -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;
index e9a6f9690697a8a41a3674346b03d11f749a0c3c..8d7ac7492bd74b8ae2e3bf80956967c46334518c 100644 (file)
@@ -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