Skip to content

Commit

Permalink
Merge pull request #1072 from planeiii-te/revision-history-clean-up
Browse files Browse the repository at this point in the history
Filter `null` values from ArgoCD response
  • Loading branch information
Xantier authored Aug 8, 2023
2 parents 85496fb + 6580746 commit 0716d0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-bags-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@roadiehq/backstage-plugin-argo-cd': patch
---

Filtered null values from ArgoCD revision history
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ export const useAppDetails = ({
return newItem;
},
);
const result = await Promise.all(getRevisionHistroyPromises);
return result;
return Promise.all(getRevisionHistroyPromises).then(result =>
result.filter(n => n),
);
}
if (appSelector || projectName) {
const result = await api.listApps({ url, appSelector, projectName });
Expand All @@ -161,7 +162,9 @@ export const useAppDetails = ({
return newItem;
},
);
return await Promise.all(getRevisionHistroyPromises);
return Promise.all(getRevisionHistroyPromises).then(output =>
output.filter(n => n),
);
}
return result;
}
Expand Down

0 comments on commit 0716d0b

Please sign in to comment.