fix empty new_posts count
This commit is contained in:
@ -38,7 +38,11 @@ defmodule SomethingErlang.AwfulApi.Bookmarks do
|
||||
info = Meeseeks.one(td, css(".info"))
|
||||
|
||||
%{
|
||||
new_posts: Meeseeks.text(last_seen) |> String.to_integer(),
|
||||
new_posts:
|
||||
case Meeseeks.text(last_seen) do
|
||||
nil -> 0
|
||||
n -> String.to_integer(n)
|
||||
end,
|
||||
thread_title: Meeseeks.text(Meeseeks.one(info, css(".thread_title")))
|
||||
}
|
||||
end
|
||||
|
Reference in New Issue
Block a user