From f4e1b469683847d5596a73890715d0f434541d30 Mon Sep 17 00:00:00 2001 From: Jakob Bagterp <25110864+jakob-bagterp@users.noreply.github.com> Date: Sun, 21 Feb 2021 11:47:35 +0100 Subject: [PATCH] Fix: Verify that grid model is JSON object and not IPublishedContent (#9774) --- src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml | 2 +- src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml index 131b0515ae..bef1b88879 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3-Fluid.cshtml @@ -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; diff --git a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml index c30feb2165..801526aaeb 100644 --- a/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml +++ b/src/Umbraco.Web.UI/Views/Partials/Grid/Bootstrap3.cshtml @@ -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;