Skip to content

Commit 2f5c7f3

Browse files
authored
Merge pull request #37806 from dotnet/merge/release/10.0-to-main
[automated] Merge branch 'release/10.0' => 'main'
2 parents 3eabbaf + 5c272e7 commit 2f5c7f3

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

‎src/EFCore/ChangeTracking/Internal/ArrayPropertyValues.cs‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -720,18 +720,14 @@ ArrayPropertyValues CreateComplexPropertyValues(object complexObject, InternalCo
720720

721721
static object? NavigateToDeclaringType(object root, ITypeBase declaringType, IRuntimeTypeBase rootType)
722722
{
723-
if (declaringType == rootType)
724-
{
725-
return root;
726-
}
727-
728-
if (declaringType is not IComplexType ct)
723+
if (declaringType == rootType
724+
|| declaringType is not IComplexType ct)
729725
{
730726
return root;
731727
}
732728

733729
var chain = ct.ComplexProperty.GetChainToComplexProperty(fromEntity: false);
734-
object? target = root;
730+
var target = root;
735731
for (var i = 0; i < chain.Count && target != null; i++)
736732
{
737733
target = chain[i].GetGetter().GetClrValue(target);

0 commit comments

Comments
 (0)