Skip to content

Commit 32eebf9

Browse files
committed
fix nullability check
1 parent 7ee1590 commit 32eebf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FSharp.MongoDB.Bson/Serialization/FSharpTypeHelpers.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ module private Helpers =
102102
let memberMap = classMap.MapMember(propertyInfo)
103103
#if !NETSTANDARD2_1
104104
let nrtInfo = nrtContext.Create(propertyInfo)
105-
if nrtInfo.WriteState = NullabilityState.Nullable then
105+
if nrtInfo.ReadState = NullabilityState.Nullable then
106106
memberMap.SetDefaultValue(objnull) |> ignore
107107
#else
108-
()
108+
memberMap.SetDefaultValue(objnull) |> ignore
109109
#endif

0 commit comments

Comments
 (0)