Skip to content

Commit e68db8f

Browse files
authored
Update CssOriginValue.cs
1 parent 46635ab commit e68db8f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/AngleSharp.Css/Values/Composites/CssOriginValue.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,13 @@ public String CssText
7474
/// <returns>True if both are equal, otherwise false.</returns>
7575
public Boolean Equals(CssOriginValue other)
7676
{
77-
return other is not null
78-
&& EqualityComparer<ICssValue>.Default.Equals(_x, other._x)
79-
&& EqualityComparer<ICssValue>.Default.Equals(_y, other._y)
80-
&& EqualityComparer<ICssValue>.Default.Equals(_z, other._z);
77+
if (other is not null)
78+
{
79+
var comparer = EqualityComparer<ICssValue>.Default;
80+
return comparer.Equals(_x, other._x) && comparer.Equals(_y, other._y) && comparer.Equals(_z, other._z);
81+
}
82+
83+
return false;
8184
}
8285

8386
ICssValue ICssValue.Compute(ICssComputeContext context)

0 commit comments

Comments
 (0)