Skip to content

Commit e09dac8

Browse files
authored
fix(DataTable): Don't cast undefined to a string (#365)
1 parent 86575df commit e09dac8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/components/DataTable/ColumnLabels.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default function ColumnLabels({
7474

7575
// TODO: The types here are very wrong and confusing.
7676
const { children } = col.props;
77-
const key = String(children[0].props.children);
77+
const key = children[0].props.children ? String(children[0].props.children) : '';
7878
const label = columnToLabel[key]
7979
? columnToLabel[key]
8080
: key && caseColumnLabel(key, columnLabelCase!);

0 commit comments

Comments
 (0)