From e37b84edf94c9ce4facaa4d5c0c65e3a2cd10c5e Mon Sep 17 00:00:00 2001 From: "Hendy@Blueberry" Date: Wed, 18 Jul 2012 13:03:34 -0100 Subject: [PATCH] quick fix to ensure all descendants matching a supplied docType are returned (rather than just the children) --- src/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs b/src/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs index 49df6d4af6..94e960a52e 100644 --- a/src/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs +++ b/src/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs @@ -170,13 +170,14 @@ namespace umbraco /// /// Gets the descendant nodes by document-type. + /// Get all descendants, and then return only those that match the requested typeAlias /// /// The umbraco.presentation.nodeFactory.Node. /// The document type alias. /// Nodes as IEnumerable public static IEnumerable GetDescendantNodesByType(this Node node, string documentTypeAlias) { - return node.GetDescendantNodes(n => n.NodeTypeAlias == documentTypeAlias); + return node.GetDescendantNodes().Where(x => x.NodeTypeAlias == documentTypeAlias); } ///