diff --git a/src/Table.tsx b/src/Table.tsx index 90f523b4..2923df58 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -527,9 +527,9 @@ function Table( React.useEffect(() => { if (!tailor || !useInternalHooks) { if (scrollBodyRef.current instanceof Element) { - setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current)?.width); + setScrollbarSize(getTargetScrollBarSize(scrollBodyRef.current).width); } else { - setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current)?.width); + setScrollbarSize(getTargetScrollBarSize(scrollBodyContainerRef.current).width); } } setSupportSticky(isStyleSupport('position', 'sticky'));