Fix optionalFieldHelper

This commit is contained in:
Michael Snoyman 2010-07-07 17:20:24 +03:00
parent 2a71c7ab9b
commit d6509266f4

View File

@ -217,7 +217,7 @@ optionalFieldHelper (FieldProfile parse render mkXml w name' label tooltip) orig
name <- maybe newFormIdent return name' name <- maybe newFormIdent return name'
let (res, val) = let (res, val) =
if null env if null env
then (FormMissing, maybe "" render orig) then (FormSuccess Nothing, maybe "" render orig)
else case lookup name env of else case lookup name env of
Nothing -> (FormSuccess Nothing, "") Nothing -> (FormSuccess Nothing, "")
Just "" -> (FormSuccess Nothing, "") Just "" -> (FormSuccess Nothing, "")