Fixes a unit test issue with the mntp editor initialization.

This commit is contained in:
Shannon
2013-12-16 16:27:59 +11:00
parent af86a5d7b1
commit 6a9b8d5540

View File

@@ -45,7 +45,11 @@ namespace umbraco.editorControls.MultiNodeTreePicker
//need to add our tree definitions to the collection.
//find the content tree to duplicate
var contentTree = TreeDefinitionCollection.Instance.Single(x => string.Equals(x.Tree.Alias, Umbraco.Core.Constants.Applications.Content, StringComparison.OrdinalIgnoreCase));
var contentTree = TreeDefinitionCollection.Instance.SingleOrDefault(x => string.Equals(x.Tree.Alias, Umbraco.Core.Constants.Applications.Content, StringComparison.OrdinalIgnoreCase));
//we cannot continue
if (contentTree == null)
return;
var filteredContentTree = new TreeDefinition(typeof(FilteredContentTree),
new umbraco.BusinessLogic.ApplicationTree(true, false, 0,
contentTree.Tree.ApplicationAlias,