Skip to content

Commit

Permalink
fix(data-grid): prevents null or undefined break max content length c…
Browse files Browse the repository at this point in the history
…alculation
  • Loading branch information
NOMADE55 committed Dec 19, 2024
1 parent dac9e93 commit 8ce3a45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/components/data-grid/data-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export class DataGrid {
let maxLength = 0;
let longestContent;
rows.forEach((row) => {
const length = row[columnIndex].toString().length;
const length = row[columnIndex]?.toString()?.length || 0;
if (length > maxLength) {
longestContent = row[columnIndex];
maxLength = length;
Expand Down

0 comments on commit 8ce3a45

Please sign in to comment.