Skip to content

Commit

Permalink
in older channels email was conditional
Browse files Browse the repository at this point in the history
fixes #193
  • Loading branch information
garbas committed Sep 17, 2020
1 parent 038ee96 commit 66b799d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Page/Packages.elm
Expand Up @@ -78,7 +78,7 @@ type alias ResultPackageLicense =

type alias ResultPackageMaintainer =
{ name : Maybe String
, email : String
, email : Maybe String
, github : Maybe String
}

Expand Down Expand Up @@ -342,7 +342,7 @@ viewResultItemDetails channel item =
Nothing ->
"#"
]
[ text <| Maybe.withDefault "" maintainer.name ++ " <" ++ maintainer.email ++ ">" ]
[ text <| Maybe.withDefault "" maintainer.name ++ " <" ++ Maybe.withDefault "" maintainer.email ++ ">" ]

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


Expand Down

0 comments on commit 66b799d

Please sign in to comment.