diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6c81afb..e583177 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +### 1.2.19 +* guarded conditional LevelChangedException + ### 1.2.18 * removed LevelChangedException diff --git a/src/FSharp.Data.Adaptive/Core/AdaptiveObject.fs b/src/FSharp.Data.Adaptive/Core/AdaptiveObject.fs index fd2d638..e146e36 100644 --- a/src/FSharp.Data.Adaptive/Core/AdaptiveObject.fs +++ b/src/FSharp.Data.Adaptive/Core/AdaptiveObject.fs @@ -164,10 +164,10 @@ module AdadptiveObjectExtensions = if depth > 1 then Transaction.RunningLevel - 1 else Transaction.RunningLevel - // if AdaptiveObject.UnsafePerformLevelChecking && x.Level > maxAllowedLevel then - // //printfn "%A tried to pull from level %A but has level %A" top.Id level top.Level - // // all greater pulls would be from the future - // raise <| LevelChangedException(x.Level + depth) + if AdaptiveObject.UnsafePerformLevelChecking && x.Level > maxAllowedLevel then + //printfn "%A tried to pull from level %A but has level %A" top.Id level top.Level + // all greater pulls would be from the future + raise <| LevelChangedException(x.Level + depth) res <- r