Possible fix for U4-2097 Package import causes template tree to break - modified

closure problem
This commit is contained in:
Sebastiaan Janssen
2013-04-17 10:57:24 -02:00
parent ff3fc5d825
commit 0cf2a1fc2a

View File

@@ -596,10 +596,11 @@ namespace Umbraco.Core.Services
LogHelper.Info<PackagingService>(string.Format("Template '{0}' has an invalid Master '{1}', so the reference has been ignored.", tempElement.Element("Alias").Value, tempElement.Element("Master").Value));
}
XElement elementCopy = tempElement;
var field = new TopologicalSorter.DependencyField<XElement>
{
Alias = tempElement.Element("Alias").Value,
Item = new Lazy<XElement>(() => tempElement),
Alias = elementCopy.Element("Alias").Value,
Item = new Lazy<XElement>(() => elementCopy),
DependsOn = dependencies.ToArray()
};