mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Added missing null check to Projection element driver's export method.
This commit is contained in:
parent
66af4a8cdf
commit
9e88d16273
@ -288,7 +288,7 @@ namespace Orchard.Layouts.Drivers {
|
||||
|
||||
protected override void OnExporting(Projection element, ExportElementContext context) {
|
||||
var query = element.QueryId != null ? _contentManager.Get<QueryPart>(element.QueryId.Value) : default(QueryPart);
|
||||
var layout = element.LayoutId != null ? _layoutRepository.Get(element.LayoutId.Value) : default(LayoutRecord);
|
||||
var layout = query != null && element.LayoutId != null ? _layoutRepository.Get(element.LayoutId.Value) : default(LayoutRecord);
|
||||
var queryIdentity = query != null ? _contentManager.GetItemMetadata(query).Identity.ToString() : default(string);
|
||||
var layoutIndex = layout != null ? query.Layouts.IndexOf(layout) : default(int?);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user