Skip to content

Commit 82e6238

Browse files
authored
Merge pull request #73 from CycloneDX/issue72
Fix handling of situations where more component versions have been removed than added
2 parents cf70266 + 56e9c6b commit 82e6238

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cyclonedx/Commands/Convert/DiffCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static async Task<int> Diff(
106106

107107
foreach (var fromComponent in new List<Component>(fromComponents))
108108
{
109-
var toComponent = toComponents.First(c => c.Name == fromComponent.Name);
109+
var toComponent = toComponents.FirstOrDefault(c => c.Name == fromComponent.Name);
110110
if (toComponent != null)
111111
{
112112
result.ComponentVersions.Modified.Add(new ModifiedDiffItem<Component>

0 commit comments

Comments
 (0)