From 1be4e59c8ce960cbae534eafbd483c2d10774dfe Mon Sep 17 00:00:00 2001 From: Jared O'Connell Date: Mon, 22 Apr 2024 11:54:23 -0400 Subject: [PATCH] Fix missing use of RootObject function --- schema/object.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/object.go b/schema/object.go index edfa569..de4910b 100644 --- a/schema/object.go +++ b/schema/object.go @@ -672,7 +672,7 @@ func ConvertToObjectSchema(typeOrData any) (Object, bool) { // Next, try scope schema. scopeSchemaType, ok := typeOrData.(*ScopeSchema) if ok { - return scopeSchemaType.Objects()[scopeSchemaType.Root()], true + return scopeSchemaType.RootObject(), true } // Try extracting the inlined ObjectSchema for types that have an ObjectSchema, like TypedObjectSchema. value := reflect.ValueOf(typeOrData)