File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -20,20 +20,24 @@ export default function cellTable(
20
20
columnProp = column
21
21
}
22
22
23
- if ( ! Array . isArray ( columnProp ) && typeof columnProp === 'object' ) {
24
- columnProp = Object . keys ( columnProp ) . map ( ( key ) => {
25
- return {
26
- Key : key ,
27
- Value : columnProp [ key ] ,
28
- }
29
- } )
23
+ if ( columnProp === undefined || columnProp === null ) {
24
+ columnProp = [ ]
30
25
} else {
31
- if ( Array . isArray ( columnProp ) && typeof columnProp [ 0 ] ! == 'object' ) {
32
- columnProp = columnProp . map ( ( row ) => {
26
+ if ( ! Array . isArray ( columnProp ) && typeof columnProp = == 'object' ) {
27
+ columnProp = Object . keys ( columnProp ) . map ( ( key ) => {
33
28
return {
34
- Value : row ,
29
+ Key : key ,
30
+ Value : columnProp [ key ] ,
35
31
}
36
32
} )
33
+ } else {
34
+ if ( Array . isArray ( columnProp ) && typeof columnProp [ 0 ] !== 'object' ) {
35
+ columnProp = columnProp . map ( ( row ) => {
36
+ return {
37
+ Value : row ,
38
+ }
39
+ } )
40
+ }
37
41
}
38
42
}
39
43
You can’t perform that action at this time.
0 commit comments