whoops, gotta filter empty votes

This commit is contained in:
Jack Wines 2023-06-16 22:01:59 -07:00
parent 69d5795eed
commit a701465d89

View file

@ -74,7 +74,7 @@ results pollId = do
noVotesAsBallot notVotedFor' = if S.null notVotedFor' then [] else [notVotedFor']
toNonEmptyList :: [B.Ballot] -> Maybe (LN.NonEmpty (LN.NonEmpty T.Text))
toNonEmptyList = LN.nonEmpty . My.mapMaybe (LN.nonEmpty . B.options)
toNonEmptyList = LN.nonEmpty . My.mapMaybe (LN.nonEmpty . filter (not . T.null) . B.options)
nthPlaceFor :: S.Set T.Text -> L.Html () -> L.Html ()
nthPlaceFor options place = do