Skip to content

Commit 0a91b1b

Browse files
authored
fix: empty state (#3055)
1 parent 815208a commit 0a91b1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shared/contexts/query.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ const parseCSV = (() => {
424424
// we have to rewrap the response to mimic the giraffe fromFlux interface
425425

426426
Object.defineProperty(data.table, 'length', {
427-
get: () => Object.values(data.table.columns)[0].data.length,
427+
get: () =>
428+
(Object.values(data?.table?.columns ?? {})[0]?.data ?? []).length || 0,
428429
})
429430
Object.defineProperty(data.table, 'columnKeys', {
430431
get: () => Object.keys(data.table.columns),

0 commit comments

Comments
 (0)