Skip to content

Commit

Permalink
fix(antd/next): fix ArrayTable crash with empty items (#2288)
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Oct 12, 2021
1 parent 67ca5e5 commit c48212c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/antd/src/array-table/index.tsx
Expand Up @@ -90,6 +90,7 @@ const useArrayTableSources = () => {
}

const parseArrayItems = (schema: Schema['items']) => {
if (!schema) return []
const sources: ObservableColumnSource[] = []
const items = isArr(schema) ? schema : [schema]
return items.reduce((columns, schema) => {
Expand Down
1 change: 1 addition & 0 deletions packages/next/src/array-table/index.tsx
Expand Up @@ -91,6 +91,7 @@ const useArrayTableSources = () => {
}

const parseArrayItems = (schema: Schema['items']) => {
if (!schema) return []
const sources: ObservableColumnSource[] = []
const items = isArr(schema) ? schema : [schema]
return items.reduce((columns, schema) => {
Expand Down

0 comments on commit c48212c

Please sign in to comment.