Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Oct 31, 2024
1 parent d173eaa commit b7a59c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/stages/postgen/postgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,10 @@ export function filterBom(bomJson, options) {
for (const aref of Object.keys(newPkgMap).sort()) {
newcomponents.push(newPkgMap[aref]);
}
newPkgMap[bomJson.metadata.component["bom-ref"]] =
bomJson.metadata.component;
if (bomJson.metadata?.component?.["bom-ref"]) {
newPkgMap[bomJson.metadata.component["bom-ref"]] =
bomJson.metadata.component;
}
if (bomJson.metadata.component.components) {
for (const comp of bomJson.metadata.component.components) {
newPkgMap[comp["bom-ref"]] = comp;
Expand Down
2 changes: 1 addition & 1 deletion types/lib/stages/postgen/postgen.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b7a59c7

Please sign in to comment.