Skip to content
Permalink
Browse files

maintainer.name field can also be null

fixes #181
  • Loading branch information
garbas committed Sep 7, 2020
1 parent 2a441c9 commit 91da1266937435c5de7a2a7c05dd9b79797d52f1
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/Page/Packages.elm
@@ -77,7 +77,7 @@ type alias ResultPackageLicense =


type alias ResultPackageMaintainer =
{ name : String
{ name : Maybe String
, email : String
, github : Maybe String
}
@@ -342,7 +342,7 @@ viewResultItemDetails channel item =
Nothing ->
"#"
]
[ text <| maintainer.name ++ " <" ++ maintainer.email ++ ">" ]
[ text <| Maybe.withDefault "" maintainer.name ++ " <" ++ maintainer.email ++ ">" ]

asPre value =
pre [] [ text value ]
@@ -460,7 +460,7 @@ decodeResultPackageLicense =
decodeResultPackageMaintainer : Json.Decode.Decoder ResultPackageMaintainer
decodeResultPackageMaintainer =
Json.Decode.map3 ResultPackageMaintainer
(Json.Decode.field "name" Json.Decode.string)
(Json.Decode.field "name" (Json.Decode.nullable Json.Decode.string))
(Json.Decode.field "email" Json.Decode.string)
(Json.Decode.field "github" (Json.Decode.nullable Json.Decode.string))

0 comments on commit 91da126

Please sign in to comment.
You can’t perform that action at this time.