WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
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

Lines changed: 1 addition & 1 deletion
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)