From 4aea1fc1e343b161fcbfe40d4c9d80d6c60bad2f Mon Sep 17 00:00:00 2001 From: JoeLee <33168975+ZoeLeee@users.noreply.github.com> Date: Tue, 16 Jul 2024 18:24:20 +0800 Subject: [PATCH] fix(nc-gui): fix download csv/xlsx error (#9010) * fix(nc-gui): fix download csv/xlsx error * refactor(nc-gui): Check if the attachment is an array --- packages/nocodb/src/helpers/dataHelpers.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/helpers/dataHelpers.ts b/packages/nocodb/src/helpers/dataHelpers.ts index d0a2a1709f..264a9de68b 100644 --- a/packages/nocodb/src/helpers/dataHelpers.ts +++ b/packages/nocodb/src/helpers/dataHelpers.ts @@ -165,7 +165,14 @@ export async function serializeCellValue( if (typeof value === 'string') { data = JSON.parse(value); } - } catch {} + + if(!Array.isArray(data)) { + data = undefined; + } + + } catch { + data = undefined; + } return (data || []) .map(