Skip to content

Commit

Permalink
Fix getting nullability info for property with getter only
Browse files Browse the repository at this point in the history
  • Loading branch information
luboshl committed Jul 26, 2024
1 parent b6ba1c0 commit 7cabcb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MiniValidationPlus/NonNullablePropertyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public bool IsNonNullableReferenceType(PropertyInfo propertyInfo)
}

var nullabilityInfo = nullabilityContext.Create(propertyInfo);
return nullabilityInfo.WriteState is not NullabilityState.Nullable;
return nullabilityInfo.ReadState is not NullabilityState.Nullable;
}
}
}
Expand Down

0 comments on commit 7cabcb5

Please sign in to comment.