Fix one of Taylor's broken comparers

This was a bug that wasn't being caught by tests until I implemented
IEquatable on the TagHelper types.
This commit is contained in:
Ryan Nowak 2017-03-19 12:39:33 -07:00
parent bbd08f0cc9
commit 8a6a22c767
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ namespace Microsoft.AspNetCore.Razor.Evolution
return true;
}
if (descriptorX == null ^ descriptorY == null)
{
return false;
}
return descriptorX != null &&
string.Equals(descriptorX.Kind, descriptorY.Kind, StringComparison.Ordinal) &&
string.Equals(descriptorX.AssemblyName, descriptorY.AssemblyName, StringComparison.Ordinal) &&