diff --git a/internal/fwschema/nested_attribute.go b/internal/fwschema/nested_attribute.go index 88353e75d..192fa0232 100644 --- a/internal/fwschema/nested_attribute.go +++ b/internal/fwschema/nested_attribute.go @@ -22,13 +22,13 @@ type NestedAttribute interface { // NestedAttribute. NestedAttribute Equal implementations should still compare // the concrete types in addition to using this helper. func NestedAttributesEqual(a, b NestedAttribute) bool { - if a.GetNestingMode() != b.GetNestingMode() { + if !AttributesEqual(a, b) { return false } - if !a.GetNestedObject().Equal(b.GetNestedObject()) { + if a.GetNestingMode() != b.GetNestingMode() { return false } - return AttributesEqual(a, b) + return a.GetNestedObject().Equal(b.GetNestedObject()) }