diff --git a/src/Umbraco.Core/EnumerableExtensions.cs b/src/Umbraco.Core/EnumerableExtensions.cs
index 177e82bbf1..e8565f3bc7 100644
--- a/src/Umbraco.Core/EnumerableExtensions.cs
+++ b/src/Umbraco.Core/EnumerableExtensions.cs
@@ -295,22 +295,5 @@ namespace Umbraco.Core
return list1Groups.Count == list2Groups.Count
&& list1Groups.All(g => g.Count() == list2Groups[g.Key].Count());
}
-
- ///
- /// Returns the items of the given enumerable as a pure enumerable.
- ///
- /// When quering lists using methods such as , the result, despite appearing to look like and quack like an
- /// the type is actually an instance of
- ///
- ///
- ///The item to find.
- ///The index of the first matching item, or -1 if the item was not found.
- internal static IEnumerable Yield(this IEnumerable source)
- {
- foreach (var element in source)
- {
- yield return element;
- }
- }
}
}
diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs
index e421cb03a6..c0c0321e91 100644
--- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs
+++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MultiNodeTreePickerPropertyConverter.cs
@@ -132,7 +132,6 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
if (nodeIds.Length > 0)
{
var umbHelper = new UmbracoHelper(UmbracoContext.Current);
-
var objectType = UmbracoObjectTypes.Unknown;
foreach (var nodeId in nodeIds)
@@ -148,8 +147,8 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
}
}
}
- //TODO: Get rid of this Yield thing
- return multiNodeTreePicker.Yield().Where(x => x != null);
+
+ return multiNodeTreePicker;
}
// return the first nodeId as this is one of the excluded properties that expects a single id
@@ -170,11 +169,13 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters
{
var item = udi.ToPublishedContent();
if (item != null)
+ {
multiNodeTreePicker.Add(item);
+ }
}
}
- //TODO: Get rid of this Yield thing
- return multiNodeTreePicker.Yield().Where(x => x != null);
+
+ return multiNodeTreePicker;
}
// return the first nodeId as this is one of the excluded properties that expects a single id