From 7bd580158dfbe58460ce1a8ae05ae1d4d907934a Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 30 Aug 2022 12:07:58 +0300 Subject: [PATCH] fix: gallery carousel Signed-off-by: mertmit --- .../nc-gui-v2/components/smartsheet/Gallery.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet/Gallery.vue b/packages/nc-gui-v2/components/smartsheet/Gallery.vue index 75b249c440..25a7bbc5a6 100644 --- a/packages/nc-gui-v2/components/smartsheet/Gallery.vue +++ b/packages/nc-gui-v2/components/smartsheet/Gallery.vue @@ -79,7 +79,7 @@ const isRowEmpty = (record: any, col: any) => { const attachments = (record: any): Array => { try { - return coverImageColumn?.title ? JSON.parse(record.row[coverImageColumn.title]) : [] + return coverImageColumn?.title && record.row[coverImageColumn.title] ? JSON.parse(record.row[coverImageColumn.title]) : [] } catch (e) { return [] } @@ -105,19 +105,24 @@ openNewRecordFormHook?.on(async () => {