Skip to content

Commit

Permalink
Fix missing use of RootObject function
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredoconnell committed Apr 22, 2024
1 parent 2e5a455 commit 1be4e59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schema/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1be4e59

Please sign in to comment.