Skip to content

Commit

Permalink
update Populate method to remove existing attributes only if it has name
Browse files Browse the repository at this point in the history
  • Loading branch information
danielklecha committed Oct 2, 2024
1 parent ecf619b commit 4763473
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SharpIpp/Protocol/Extensions/ListExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void Populate(this List<IppAttribute> list, IEnumerable<IppAttribu

foreach (var additionalAttribute in other)
{
list.RemoveAll(x => x.Name == additionalAttribute.Name);
list.RemoveAll(x => !string.IsNullOrEmpty(x.Name) && x.Name == additionalAttribute.Name);
list.Add(additionalAttribute);
}
}
Expand Down

0 comments on commit 4763473

Please sign in to comment.