Skip to content

Commit 0f03851

Browse files
committed
add resize observer check
1 parent 5b477f2 commit 0f03851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/table/sticky-scrollbar/use-sticky-scrollbar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function useStickyScrollbar(
8484

8585
// Update scrollbar position wrapper or table size change.
8686
useEffect(() => {
87-
if (wrapperRef.current && tableRef.current) {
87+
if (wrapperRef.current && tableRef.current && typeof ResizeObserver !== 'undefined') {
8888
const observer = new ResizeObserver(() => {
8989
if (scrollbarContentRef.current) {
9090
updatePosition(

0 commit comments

Comments
 (0)