Fix: Verify that grid model is JSON object and not IPublishedContent (#9774)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
Razor helpers located at the bottom of this file
|
||||
*@
|
||||
|
||||
@if (Model != null && Model.sections != null)
|
||||
@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null)
|
||||
{
|
||||
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@using Umbraco.Web.Templates
|
||||
@using Newtonsoft.Json.Linq
|
||||
|
||||
@if (Model != null && Model.sections != null)
|
||||
@if (Model != null && Model.GetType() == typeof(JObject) && Model.sections != null)
|
||||
{
|
||||
var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user