fix(nc-gui): BT cell verify paste value

This commit is contained in:
Ramesh Mane
2024-02-19 03:41:20 +00:00
parent 87049413f0
commit b938c3f64f

View File

@@ -246,6 +246,17 @@ export default function convertCellData(
return parsedVal || value
}
case UITypes.LinkToAnotherRecord: {
const parsedVal = typeof value === 'string' ? JSON.parse(value) : value
if (!(parsedVal && typeof parsedVal === 'object' && !Array.isArray(parsedVal) && Object.keys(parsedVal))) {
throw new Error('Invalid LTAR data')
}
if (isMultiple) {
return undefined
}
return parsedVal
}
case UITypes.Lookup:
case UITypes.Rollup:
case UITypes.Formula: