From bb5a70f9a8dcf4cb4e3a31a8c9f617bc81f40b9f Mon Sep 17 00:00:00 2001 From: Crystal Qian Date: Tue, 30 Aug 2016 09:53:45 -0700 Subject: [PATCH] Added a check for property bag in tag helper descriptor comparer. Modified TagHelperDescriptorComparer to reflect changes made in #822. --- .../Compilation/TagHelpers/TagHelperDescriptorComparer.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs b/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs index 560ebf32b6..3bf1250a76 100644 --- a/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs +++ b/src/Microsoft.AspNetCore.Razor/Compilation/TagHelpers/TagHelperDescriptorComparer.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Internal; @@ -61,7 +62,10 @@ namespace Microsoft.AspNetCore.Razor.Compilation.TagHelpers descriptorX.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase), descriptorY.AllowedChildren.OrderBy(child => child, StringComparer.OrdinalIgnoreCase), StringComparer.OrdinalIgnoreCase))) && - descriptorX.TagStructure == descriptorY.TagStructure; + descriptorX.TagStructure == descriptorY.TagStructure && + Enumerable.SequenceEqual( + descriptorX.PropertyBag.OrderBy(propertyX => propertyX.Key, StringComparer.Ordinal), + descriptorY.PropertyBag.OrderBy(propertyY => propertyY.Key, StringComparer.Ordinal)); } ///