fix(exams): default exam mode to Nothing

This commit is contained in:
Gregor Kleen 2020-09-29 10:14:27 +02:00
parent 33ae83faa7
commit 4b459ea143

View File

@ -1961,9 +1961,9 @@ customPresetForm :: forall a custom preset msg.
-> Maybe (Maybe a)
-> AForm Handler (Maybe a)
customPresetForm cpL noneOption customOption toOption customForm fs mPrev
= explainedMultiActionA actionMap options fs mPrev'
= explainedMultiActionA actionMap options fs $ Just mPrev'
where
mPrev' = flip fmap mPrev $ preview (_Just . cpL) >>> \case
mPrev' = case mPrev ^? _Just . _Just . cpL of
Nothing -> CPFONone
Just (Left _) -> CPFOCustom
Just (Right p) -> CPFOPreset p