Skip to content

Commit

Permalink
fix(antd/next): fix array base not work with pure jsx (#3317)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Aug 10, 2022
1 parent e718f2b commit acd6533
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/antd/src/array-base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ const getSchemaDefaultValue = (schema: Schema) => {
const getDefaultValue = (defaultValue: any, schema: Schema) => {
if (isValid(defaultValue)) return clone(defaultValue)
if (Array.isArray(schema?.items))
return getSchemaDefaultValue(schema.items[0])
return getSchemaDefaultValue(schema.items)
return getSchemaDefaultValue(schema?.items[0])
return getSchemaDefaultValue(schema?.items)
}

export const ArrayBase: ComposedArrayBase = (props) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/next/src/array-base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ const getSchemaDefaultValue = (schema: Schema) => {
const getDefaultValue = (defaultValue: any, schema: Schema) => {
if (isValid(defaultValue)) return clone(defaultValue)
if (Array.isArray(schema?.items))
return getSchemaDefaultValue(schema.items[0])
return getSchemaDefaultValue(schema.items)
return getSchemaDefaultValue(schema?.items[0])
return getSchemaDefaultValue(schema?.items)
}

export const ArrayBase: ComposedArrayBase = (props) => {
Expand Down

0 comments on commit acd6533

Please sign in to comment.