diff --git a/src/stickyScrollBar.tsx b/src/stickyScrollBar.tsx index 06af5e8d9..2cd39865b 100644 --- a/src/stickyScrollBar.tsx +++ b/src/stickyScrollBar.tsx @@ -80,6 +80,9 @@ const StickyScrollBar: React.ForwardRefRenderFunction { + if (!scrollBodyRef.current) { + return; + } const tableOffsetTop = getOffset(scrollBodyRef.current).top; const tableBottomOffset = tableOffsetTop + scrollBodyRef.current.offsetHeight; const currentClientOffset =