Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMagee committed Jun 15, 2022
1 parent 185a0b9 commit 2b62709
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private static Component ToComponent(this ScannedComponent scannedComponent)
break;
case ComponentType.Npm:
var npmComponent = (NpmComponent)scannedComponent.Component;
component.Author = $"{npmComponent.Author.Name} <{npmComponent.Author.Email}>";
component.Author = $"{npmComponent.Author?.Name} <{npmComponent.Author?.Email}>";
component.Hashes = new List<Hash>
{
new Hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public void ToCycloneDx_HappyPath()
new ScannedComponent
{
Component = new NpmComponent("lodash", "1.2.3"),
LocationsFoundAt = new []
{
"/src/lodash.js",
},
},
},
};
Expand Down

0 comments on commit 2b62709

Please sign in to comment.