From 605725183c45ce34c5a30a3a40d80c1d7575125e Mon Sep 17 00:00:00 2001 From: Rhys Koedijk Date: Fri, 3 Jan 2025 23:45:47 +1300 Subject: [PATCH] Fix summary artifact not generating on first load --- ui/sbom-report-tab.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/sbom-report-tab.tsx b/ui/sbom-report-tab.tsx index 4f96ab0..ad33c82 100644 --- a/ui/sbom-report-tab.tsx +++ b/ui/sbom-report-tab.tsx @@ -172,9 +172,6 @@ export class Root extends React.Component<{}, State> { } } - // Generate a summary SBOM artifact if multiple artifacts were loaded - this.generateSbomSummaryArtifact(); - // Update the state with the loaded SBOM artifacts console.info(`Loaded ${Object.keys(sbomArtifacts).length} SBOM artifact(s) for build ${buildId}`); this.selectedArtifactId.value = sbomArtifacts[0]?.spdxDocument?.documentNamespace || ''; @@ -183,6 +180,9 @@ export class Root extends React.Component<{}, State> { loadingMessage: undefined, loadError: undefined, }); + + // Generate a summary SBOM artifact if multiple artifacts were loaded + this.generateSbomSummaryArtifact(); } catch (error) { console.error(error); this.setState({ loadError: error });