fix: AutoFromFieldObject not utilising base schema (#526)
This commit is contained in:
parent
9dfb0b86c0
commit
e67c98b485
|
|
@ -28,7 +28,8 @@ const shapes = computed(() => {
|
|||
return
|
||||
Object.keys(shape).forEach((name) => {
|
||||
const item = shape[name] as ZodAny
|
||||
let options = 'values' in item._def ? item._def.values as string[] : undefined
|
||||
const baseItem = getBaseSchema(item) as ZodAny
|
||||
let options = (baseItem && 'values' in baseItem._def) ? baseItem._def.values as string[] : undefined
|
||||
if (!Array.isArray(options) && typeof options === 'object')
|
||||
options = Object.values(options)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ const shapes = computed(() => {
|
|||
return
|
||||
Object.keys(shape).forEach((name) => {
|
||||
const item = shape[name] as ZodAny
|
||||
let options = 'values' in item._def ? item._def.values as string[] : undefined
|
||||
const baseItem = getBaseSchema(item) as ZodAny
|
||||
let options = (baseItem && 'values' in baseItem._def) ? baseItem._def.values as string[] : undefined
|
||||
if (!Array.isArray(options) && typeof options === 'object')
|
||||
options = Object.values(options)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user