diff --git a/make-pages/Info.hs b/make-pages/Info.hs index 10d6632..0677ca0 100644 --- a/make-pages/Info.hs +++ b/make-pages/Info.hs @@ -163,7 +163,8 @@ instance HasField "notMine" Info Bool where getField = isJust . #artist instance HasField "latestDate" Info (Bool -> Date) where getField info@(Info {date=date₀}) nsfw = maximum $ date₀ : mapMaybe relDate (updatesFor nsfw info) - where relDate (date, us) = date <$ guard (not $ any #ignoreSort us) + where + relDate (date, us) = date <$ guard (not $ null us || any #ignoreSort us) instance HasField "latestYear" Info (Bool -> Int) where getField info nsfw = #year $ #latestDate info nsfw