From 38ca4f5260b06d9112bf87f2cb67ee73701026cf Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 27 Sep 2025 09:45:31 +0000 Subject: [PATCH] nit --- frontend/src/lib/components/DisplayResult.svelte | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/components/DisplayResult.svelte b/frontend/src/lib/components/DisplayResult.svelte index 4b5b22e34d..f27c821139 100644 --- a/frontend/src/lib/components/DisplayResult.svelte +++ b/frontend/src/lib/components/DisplayResult.svelte @@ -149,14 +149,20 @@ ) } - function isTableRowObjectWithoutHeaders(json: any, checkFirst) { + function isTableRowObjectWithoutHeaders(json: any, skipMaxColCheck: boolean) { return ( Array.isArray(json) && json.length > 0 && - (!checkFirst || - (json[0] && typeof json[0] === 'object' && Object.keys(json[0]).length <= 100)) && json.every((item) => { - return typeof item === 'object' && Object.keys(item).length > 0 && !Array.isArray(item) + if (item && typeof item === 'object') { + let keys = Object.keys(item) + if (keys.length > 0 && !Array.isArray(item)) { + if (skipMaxColCheck || keys.length <= 100) { + return true + } + } + } + return false }) ) }