We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8f2f09 commit 025cba2Copy full SHA for 025cba2
1 file changed
src/NuGet.Core/NuGet.ProjectModel/LockFile/LockFileItem.cs
@@ -58,17 +58,14 @@ public bool Equals(LockFileItem other)
58
bool thisEmpty = _properties == null || _properties.Count == 0;
59
bool otherEmpty = other._properties == null || other._properties.Count == 0;
60
61
- if (thisEmpty && otherEmpty)
+ if (thisEmpty || otherEmpty)
62
{
63
- return true;
+ return thisEmpty && otherEmpty;
64
}
65
-
66
- if (thisEmpty || otherEmpty)
+ else
67
68
- return false;
+ return _properties.OrderedEquals(other._properties, pair => pair.Key, StringComparer.Ordinal);
69
70
71
- return _properties.OrderedEquals(other._properties, pair => pair.Key, StringComparer.Ordinal);
72
73
74
return false;
0 commit comments