From 6c23066fb7087ad46b31e254420c2ebdd53cf2da Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 20 Feb 2019 21:03:36 +1100 Subject: [PATCH] Fixes the Content.Children conundrum with ChildrenOfType method --- src/Umbraco.Web/PublishedContentExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index c77594eabe..33cc8dd761 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -981,7 +981,7 @@ namespace Umbraco.Web /// The specific culture to filter for. If null is used the current culture is used. (Default is null) /// One or more content type alias. /// The children of the content, of any of the specified types. - public static IEnumerable Children(this IPublishedContent content, string culture = null, params string[] alias) + public static IEnumerable ChildrenOfType(this IPublishedContent content, string alias, string culture = null) { return content.Children(x => alias.InvariantContains(x.ContentType.Alias), culture); } @@ -1012,7 +1012,7 @@ namespace Umbraco.Web /// public static IPublishedContent FirstChildOfType(this IPublishedContent content, string alias, string culture = null) { - return content.Children(culture,alias).FirstOrDefault(); + return content.ChildrenOfType(alias, culture).FirstOrDefault(); } public static IPublishedContent FirstChild(this IPublishedContent content, Func predicate, string culture = null)