From ea5a92782e363c10025fb6512a4f4aee6350201e Mon Sep 17 00:00:00 2001 From: Richard Feldman <richard.t.feldman@gmail.com> Date: Mon, 8 May 2017 05:27:15 -0700 Subject: [PATCH] Support null descriptions. --- src/Data/Article.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Article.elm b/src/Data/Article.elm index c86bd1ce77..3f2d0dc908 100644 --- a/src/Data/Article.elm +++ b/src/Data/Article.elm @@ -80,7 +80,7 @@ decoderWithBody = baseArticleDecoder : Decoder (a -> Article a) baseArticleDecoder = decode Article - |> required "description" Decode.string + |> required "description" (Decode.map (Maybe.withDefault "") (Decode.nullable Decode.string)) |> required "slug" (Decode.map Slug Decode.string) |> required "title" Decode.string |> required "tagList" (Decode.list Decode.string)