diff --git a/web/app/(commonLayout)/datasets/Datasets.tsx b/web/app/(commonLayout)/datasets/Datasets.tsx index f4d2156a81..0b34341e1f 100644 --- a/web/app/(commonLayout)/datasets/Datasets.tsx +++ b/web/app/(commonLayout)/datasets/Datasets.tsx @@ -66,9 +66,9 @@ const Datasets = ({ useEffect(() => { const onScroll = debounce(() => { - if (!loadingStateRef.current && containerRef.current && anchorRef.current) { + if (!loadingStateRef.current) { const { scrollTop, clientHeight } = containerRef.current! - const anchorOffset = anchorRef.current.offsetTop + const anchorOffset = anchorRef.current!.offsetTop if (anchorOffset - scrollTop - clientHeight < 100) setSize(size => size + 1) } @@ -79,7 +79,7 @@ const Datasets = ({ }, []) return ( -