diff --git a/GanjooRazor/Pages/Partials/GanjoorPage/PageTypes/_CatPagePartial.cshtml b/GanjooRazor/Pages/Partials/GanjoorPage/PageTypes/_CatPagePartial.cshtml index 8ab758b7..79a3c0a2 100644 --- a/GanjooRazor/Pages/Partials/GanjoorPage/PageTypes/_CatPagePartial.cshtml +++ b/GanjooRazor/Pages/Partials/GanjoorPage/PageTypes/_CatPagePartial.cshtml @@ -104,8 +104,11 @@
- @* Map *@ - @if (!Model.OfflineMode && Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0) + @* Map - only when at least one tag actually carries a Location; person tags (added alongside + geo/date tags on the same CategoryPoemGeoDateTags array) never have one, so a category whose + tags are all person tags would otherwise still pass a plain "array not empty" check below and + render an empty map with nothing to pin. *@ + @if (!Model.OfflineMode && Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Any(t => t.Location != null)) {
} @@ -146,7 +149,7 @@ } -@if (!Model.OfflineMode && Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Length > 0) +@if (!Model.OfflineMode && Model.CategoryPoemGeoDateTags != null && Model.CategoryPoemGeoDateTags.Any(t => t.Location != null)) {