diff --git a/src/Handler/Utils/Form.hs b/src/Handler/Utils/Form.hs index 5a5845426..25053ed09 100644 --- a/src/Handler/Utils/Form.hs +++ b/src/Handler/Utils/Form.hs @@ -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