Permalink
Browse files

remove the second fromJust

  • Loading branch information...
1 parent 089bbed commit 62a3665128c337ed7d6e527c41469132ffd7cba0 @Geal committed Mar 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 site.hs
View
@@ -124,7 +124,7 @@ getWords :: Compiler String -> Compiler [Item String] -> Routes -> Compiler Stri
getWords route posts routes = do
p <- posts
r <- route
- return $ case r of "urls.json" -> encode . showJSON $ fmap (fromJust . (runRoutes routes) . itemIdentifier) p
+ return $ case r of "urls.json" -> encode . showJSON . catMaybes $ ((runRoutes routes) . itemIdentifier) <$> p
str -> encode . toJSObject . postsToWordList $ p
createSearch :: Compiler [Item String] -> Routes -> Rules()

0 comments on commit 62a3665

Please sign in to comment.