#18192: Fixing localization

Work Item: 18192

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-12-15 18:19:27 -08:00
parent 44826f8b43
commit 98b8ccfb5c

View File

@@ -69,7 +69,10 @@ namespace Orchard.DisplayManagement.Implementation {
}
// copy all binding sources (all templates for this shape) in order to use them as Localization scopes
shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources;
shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources.Where(x => x != null).ToList();
if (!shapeMetadata.BindingSources.Any()) {
shapeMetadata.BindingSources.Add(shapeBinding.ShapeDescriptor.BindingSource);
}
// invoking ShapeMetadata displaying events
shapeMetadata.Displaying.Invoke(action => action(displayingContext), Logger);