From 1ecf99c711d8cf17b33a242f44b0f9eff7c0a287 Mon Sep 17 00:00:00 2001 From: Rok Garbas Date: Thu, 17 Sep 2020 17:32:30 +0200 Subject: [PATCH] in older channels email was conditional (#194) fixes #193 --- src/Page/Packages.elm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Page/Packages.elm b/src/Page/Packages.elm index 247d096..a913bb6 100644 --- a/src/Page/Packages.elm +++ b/src/Page/Packages.elm @@ -78,7 +78,7 @@ type alias ResultPackageLicense = type alias ResultPackageMaintainer = { name : Maybe String - , email : String + , email : Maybe String , github : Maybe String } @@ -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 ] @@ -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))