Comment up part5

This commit is contained in:
Richard Feldman
2016-06-25 08:16:42 -07:00
parent ef168e59c2
commit a771127739

View File

@@ -103,11 +103,12 @@ initialModel =
decodeResults : String -> List SearchResult
decodeResults json =
case Json.Decode.decodeString responseDecoder json of
Ok results ->
results
Err err ->
-- TODO use Json.Decode.decodeString to translate this into either:
--
-- * the search results, if decoding succeeded
-- * an empty list if decoding failed
--
-- see http://package.elm-lang.org/packages/elm-lang/core/4.0.0/Json-Decode#decodeString
[]