File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
frontend/src/lib/components Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 149149 )
150150 }
151151
152- function isTableRowObjectWithoutHeaders(json : any , checkFirst ) {
152+ function isTableRowObjectWithoutHeaders(json : any , skipMaxColCheck : boolean ) {
153153 return (
154154 Array .isArray (json ) &&
155155 json .length > 0 &&
156- (! checkFirst ||
157- (json [0 ] && typeof json [0 ] === ' object' && Object .keys (json [0 ]).length <= 100 )) &&
158156 json .every ((item ) => {
159- return typeof item === ' object' && Object .keys (item ).length > 0 && ! Array .isArray (item )
157+ if (item && typeof item === ' object' ) {
158+ let keys = Object .keys (item )
159+ if (keys .length > 0 && ! Array .isArray (item )) {
160+ if (skipMaxColCheck || keys .length <= 100 ) {
161+ return true
162+ }
163+ }
164+ }
165+ return false
160166 })
161167 )
162168 }
You can’t perform that action at this time.
0 commit comments