From 1ef57f84aad82fa8afb2fb172c795a28b5fb3369 Mon Sep 17 00:00:00 2001 From: Mark Downie Date: Sun, 26 Jun 2022 20:07:39 -0400 Subject: [PATCH 1/3] This resolves a general null reference issue. If folks have used customer _BlogItems/_BlogItemsSummary it will require the same update. --- source/DasBlog.Web.UI/Views/Shared/_BlogItems.cshtml | 2 +- source/DasBlog.Web.UI/Views/Shared/_BlogItemsSummary.cshtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/DasBlog.Web.UI/Views/Shared/_BlogItems.cshtml b/source/DasBlog.Web.UI/Views/Shared/_BlogItems.cshtml index 86d568e0..b673948d 100644 --- a/source/DasBlog.Web.UI/Views/Shared/_BlogItems.cshtml +++ b/source/DasBlog.Web.UI/Views/Shared/_BlogItems.cshtml @@ -1,7 +1,7 @@ @model ListPostsViewModel -@if (Model.Posts.Count > 0) +@if (Model?.Posts?.Count > 0) { foreach (var post in Model.Posts) { diff --git a/source/DasBlog.Web.UI/Views/Shared/_BlogItemsSummary.cshtml b/source/DasBlog.Web.UI/Views/Shared/_BlogItemsSummary.cshtml index 869d2cde..109caa26 100644 --- a/source/DasBlog.Web.UI/Views/Shared/_BlogItemsSummary.cshtml +++ b/source/DasBlog.Web.UI/Views/Shared/_BlogItemsSummary.cshtml @@ -1,7 +1,7 @@ @model ListPostsViewModel -@if (Model.Posts.Count > 0) +@if (Model?.Posts?.Count > 0) { int order = 0; From be88371aa7aa26eb7bc983c398857e30ecb2fab2 Mon Sep 17 00:00:00 2001 From: Mark Downie Date: Sun, 26 Jun 2022 21:37:13 -0400 Subject: [PATCH 2/3] Fixed the "median" theme --- source/DasBlog.Web.UI/Themes/median/_Layout.cshtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/DasBlog.Web.UI/Themes/median/_Layout.cshtml b/source/DasBlog.Web.UI/Themes/median/_Layout.cshtml index dd3cb008..8cef03f8 100644 --- a/source/DasBlog.Web.UI/Themes/median/_Layout.cshtml +++ b/source/DasBlog.Web.UI/Themes/median/_Layout.cshtml @@ -20,7 +20,7 @@
-