Fixes U4-2179 Error with GetChildNodes after upgrade to Umbraco 6.0.5 from

Umbraco 6.0.0
This commit is contained in:
Sebastiaan Janssen
2013-05-06 12:06:45 -02:00
parent 6d66fc6cb8
commit 09e31d6595

View File

@@ -238,7 +238,8 @@ namespace umbraco
/// <returns>Nodes as IEnumerable</returns>
public static IEnumerable<Node> GetDescendantNodes(this Node node, Func<Node, bool> func)
{
return GetDescendantNodes((INode)node, (Func<INode, bool>) func).Cast<Node>();
Func<INode, bool> convertedFunc = x => func((Node)x);
return GetDescendantNodes((INode)node, convertedFunc).Cast<Node>();
}
/// <summary>
@@ -322,7 +323,8 @@ namespace umbraco
/// <returns>Nodes as IEnumerable</returns>
public static IEnumerable<Node> GetChildNodes(this Node node, Func<Node, bool> func)
{
return GetChildNodes((INode)node, (Func<INode, bool>) func).Cast<Node>();
Func<INode, bool> convertedFunc = x => func((Node)x);
return GetChildNodes((INode)node, convertedFunc).Cast<Node>();
}
/// <summary>