diff --git a/src/FsToolkit.ErrorHandling/TaskOptionCE.fs b/src/FsToolkit.ErrorHandling/TaskOptionCE.fs index ac058250..d3938c99 100644 --- a/src/FsToolkit.ErrorHandling/TaskOptionCE.fs +++ b/src/FsToolkit.ErrorHandling/TaskOptionCE.fs @@ -299,8 +299,7 @@ type TaskOptionBuilder() = // If the `sm.Data.MethodBuilder` has already been set somewhere else (like While/WhileDynamic), we shouldn't continue if sm.Data.IsTaskCompleted then () - - if step then + elif step then sm.Data.SetResult() else match sm.ResumptionDynamicInfo.ResumptionData with diff --git a/src/FsToolkit.ErrorHandling/TaskValueOptionCE.fs b/src/FsToolkit.ErrorHandling/TaskValueOptionCE.fs index 56a39b78..c46ec9e1 100644 --- a/src/FsToolkit.ErrorHandling/TaskValueOptionCE.fs +++ b/src/FsToolkit.ErrorHandling/TaskValueOptionCE.fs @@ -306,8 +306,7 @@ type TaskValueOptionBuilder() = // If the `sm.Data.MethodBuilder` has already been set somewhere else (like While/WhileDynamic), we shouldn't continue if sm.Data.IsTaskCompleted then () - - if step then + elif step then sm.Data.SetResult() else match sm.ResumptionDynamicInfo.ResumptionData with diff --git a/src/FsToolkit.ErrorHandling/ValueTaskValueOptionCE.fs b/src/FsToolkit.ErrorHandling/ValueTaskValueOptionCE.fs index dcd6b19e..0f4207c5 100644 --- a/src/FsToolkit.ErrorHandling/ValueTaskValueOptionCE.fs +++ b/src/FsToolkit.ErrorHandling/ValueTaskValueOptionCE.fs @@ -242,8 +242,7 @@ type ValueTaskValueOptionBuilder() = // If the `sm.Data.MethodBuilder` has already been set somewhere else (like While/WhileDynamic), we shouldn't continue if sm.Data.IsTaskCompleted then () - - if step then + elif step then sm.Data.SetResult() else match sm.ResumptionDynamicInfo.ResumptionData with