Skip to content

Commit 10a92d3

Browse files
committed
chore: save
1 parent 90a1866 commit 10a92d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/packages/infiniteloading/infiniteloading.taro.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ export const InfiniteLoading: FunctionComponent<
7878

7979
useEffect(() => {
8080
refreshMaxH.current = threshold
81-
setTimeout(() => {
81+
const timer = setTimeout(() => {
8282
getScrollHeight()
8383
}, 200)
84-
}, [hasMore, isInfiniting])
84+
return () => clearTimeout(timer)
85+
}, [hasMore, isInfiniting, threshold])
8586

8687
/** 获取需要滚动的距离 */
8788
const getScrollHeight = () => {

0 commit comments

Comments
 (0)