Table: Fix edge case where text wrapping crashes on undefined header widths (#91850)

Make sure we don't read from header groups if it's undefined
This commit is contained in:
Kyle Cunningham authored and GitHub committed 2024-08-15 01:49:28 +07:00
1 parent 8c4da28d7c
commit 40144eb3c8
1 file changed
+1 -1
@@ -645,7 +645,7 @@ export function guessTextBoundingBox(
lineHeight: number,
defaultRowHeight: number
) {
const width = Number(headerGroup.width ?? 300);
const width = Number(headerGroup?.width ?? 300);
const LINE_SCALE_FACTOR = 1.17;
const LOW_LINE_PAD = 42;