change to use ?? instead

This commit is contained in:
Fendy Heryanto
2025-04-07 16:54:06 +00:00
parent bf8d01ab08
commit ac5179c61e

View File

@@ -11,13 +11,8 @@ export const valueToCopy = (
},
) => {
const { isPg, isMysql, meta, metas } = cb
let textToCopy = ''
if (columnObj.title) {
const rowValue = rowObj.row[columnObj.title]
if (!ncIsUndefined(rowValue) && !ncIsNull(rowValue)) {
textToCopy = rowObj.row[columnObj.title]
}
}
const textToCopy = (columnObj.title && rowObj.row[columnObj.title]) ?? ''
return ColumnHelper.parseValue(textToCopy, {
col: columnObj,
isMysql,