generate empty game stats report on failure

This commit is contained in:
Jonathan Lamothe 2019-10-16 02:32:57 -04:00
parent 19e0242135
commit cfe2969106

View File

@ -91,8 +91,8 @@ standingsReport width s = fromMaybe [] $ do
] ]
gameStatsReport :: Int -> ProgState -> [String] gameStatsReport :: Int -> ProgState -> [String]
gameStatsReport width s = maybe [] (playerReport width "GAME") $ gameStatsReport width s = playerReport width "GAME" $
mapM fromMaybe [] $ mapM
(\(pid, stats) -> do (\(pid, stats) -> do
p <- nth pid $ s^.database.dbPlayers p <- nth pid $ s^.database.dbPlayers
Just (p, stats)) Just (p, stats))