From cc78af29c75d54f240afddb376bec33937d7b18a Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 30 Jan 2024 05:03:30 +0000 Subject: [PATCH] fix(nc-gui): prevent paste on attachment cell if paste data is non object --- .../nc-gui/composables/useMultiSelect/convertCellData.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/composables/useMultiSelect/convertCellData.ts b/packages/nc-gui/composables/useMultiSelect/convertCellData.ts index 414f97fc68..5151b9a5df 100644 --- a/packages/nc-gui/composables/useMultiSelect/convertCellData.ts +++ b/packages/nc-gui/composables/useMultiSelect/convertCellData.ts @@ -125,7 +125,11 @@ export default function convertCellData( if (value) { try { parsedVal = parseProp(value) - parsedVal = Array.isArray(parsedVal) ? parsedVal : [parsedVal] + parsedVal = Array.isArray(parsedVal) + ? parsedVal + : typeof parsedVal === 'object' && Object.keys(parsedVal).length + ? [parsedVal] + : [] } catch (e) { if (isMultiple) { return null