Browse Source

fix(nc-gui): prevent paste on attachment cell if paste data is non object

pull/7491/head
Ramesh Mane 10 months ago
parent
commit
cc78af29c7
  1. 6
      packages/nc-gui/composables/useMultiSelect/convertCellData.ts

6
packages/nc-gui/composables/useMultiSelect/convertCellData.ts

@ -125,7 +125,11 @@ export default function convertCellData(
if (value) { if (value) {
try { try {
parsedVal = parseProp(value) parsedVal = parseProp(value)
parsedVal = Array.isArray(parsedVal) ? parsedVal : [parsedVal] parsedVal = Array.isArray(parsedVal)
? parsedVal
: typeof parsedVal === 'object' && Object.keys(parsedVal).length
? [parsedVal]
: []
} catch (e) { } catch (e) {
if (isMultiple) { if (isMultiple) {
return null return null

Loading…
Cancel
Save