File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/AngleSharp.Css/Values/Composites Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ namespace AngleSharp.Css.Values
2
2
{
3
3
using AngleSharp . Css . Dom ;
4
4
using System ;
5
+ using System . Collections . Generic ;
5
6
6
7
/// <summary>
7
8
/// Represents a CSS origin definition.
@@ -73,14 +74,17 @@ public String CssText
73
74
/// <returns>True if both are equal, otherwise false.</returns>
74
75
public Boolean Equals ( CssOriginValue other )
75
76
{
76
- return _x . Equals ( other . _x ) && _y . Equals ( other . _y ) && _z . Equals ( other . _z ) ;
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
81
}
78
82
79
83
ICssValue ICssValue . Compute ( ICssComputeContext context )
80
84
{
81
- var x = _x . Compute ( context ) ;
82
- var y = _y . Compute ( context ) ;
83
- var z = _z . Compute ( context ) ;
85
+ var x = _x ? . Compute ( context ) ;
86
+ var y = _y ? . Compute ( context ) ;
87
+ var z = _z ? . Compute ( context ) ;
84
88
85
89
if ( x != _x || y != _y || z != _z )
86
90
{
You can’t perform that action at this time.
0 commit comments