diff --git a/mzLib/Proteomics/ProteolyticDigestion/PeptideWithSetModifications.cs b/mzLib/Proteomics/ProteolyticDigestion/PeptideWithSetModifications.cs index 0e8ee7864..9cc9756b4 100644 --- a/mzLib/Proteomics/ProteolyticDigestion/PeptideWithSetModifications.cs +++ b/mzLib/Proteomics/ProteolyticDigestion/PeptideWithSetModifications.cs @@ -898,8 +898,7 @@ public bool Equals(PeptideWithSetModifications other) // interface equals first because it does null and reference checks return (this as IBioPolymerWithSetMods).Equals(other) && OneBasedStartResidue == other!.OneBasedStartResidue - && (Parent?.Accession == null && other?.Parent.Accession == null - || other.Parent.Accession.Equals(Parent?.Accession)); + && Equals(Parent?.Accession, other.Parent?.Accession); } public override int GetHashCode()