Skip to content

Commit

Permalink
Merge pull request #2362 from ShuiRuTian/fix-and-simplify
Browse files Browse the repository at this point in the history
Fix Equals of AutoCompleteResponse
  • Loading branch information
333fred authored Mar 25, 2022
2 parents 88facb0 + 3004aaa commit 8951cea
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public class AutoCompleteResponse
public override bool Equals(object other)
{
var otherResponse = other as AutoCompleteResponse;
return otherResponse.DisplayText == DisplayText
return otherResponse != null
&& otherResponse.DisplayText == DisplayText
&& otherResponse.Snippet == Snippet;
}

Expand Down

0 comments on commit 8951cea

Please sign in to comment.