We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4789821 commit d9063f6Copy full SHA for d9063f6
1 file changed
src/utils/index.ts
@@ -27,6 +27,13 @@ export function getColumnWidthForMeasurement<R, SR>(
27
}
28
29
const widthWithUnit = typeof width === 'number' ? `${width}px` : width;
30
+
31
+ // don't break in Node.js (SSR) and jsdom
32
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
33
+ if (CSS == null) {
34
+ return widthWithUnit;
35
+ }
36
37
const hasMaxWidth = maxWidth != null;
38
const clampedWidth = hasMaxWidth
39
? `clamp(${minWidth}px, ${widthWithUnit}, ${maxWidth}px)`
0 commit comments