fixes a null check issue
This commit is contained in:
@@ -23,13 +23,17 @@ namespace OurUmbraco.Repository.Models
|
||||
|
||||
public bool Equals(PackageVersionSupport other)
|
||||
{
|
||||
if (ReferenceEquals(null, other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return _fileId == other._fileId;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj)) return false;
|
||||
return obj is PackageVersionSupport && Equals((PackageVersionSupport)obj);
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
if (obj.GetType() != this.GetType()) return false;
|
||||
return Equals((PackageVersionSupport) obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
@@ -39,12 +43,12 @@ namespace OurUmbraco.Repository.Models
|
||||
|
||||
public static bool operator ==(PackageVersionSupport left, PackageVersionSupport right)
|
||||
{
|
||||
return left.Equals(right);
|
||||
return Equals(left, right);
|
||||
}
|
||||
|
||||
public static bool operator !=(PackageVersionSupport left, PackageVersionSupport right)
|
||||
{
|
||||
return !left.Equals(right);
|
||||
return !Equals(left, right);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user