Skip to content

Commit 4e7e56e

Browse files
committed
fix error when pasting from .xls file
1 parent 0ab04b7 commit 4e7e56e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/columns/textColumn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export function createTextColumn<T = string | null>({
175175
formatInputOnFocus = (value) => String(value ?? ''),
176176
formatForCopy = (value) => String(value ?? ''),
177177
parsePastedValue = (value) =>
178-
(value.replace(/[\n\r]+/g, ' ').trim() || (null as unknown)) as T,
178+
((value.replace(/[\n\r]+/g, ' ') ?? '').trim() || (null as unknown)) as T,
179179
}: TextColumnOptions<T> = {}): Partial<Column<T, TextColumnData<T>, string>> {
180180
return {
181181
component: TextComponent as unknown as CellComponent<T, TextColumnData<T>>,

0 commit comments

Comments
 (0)