mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 01:05:34 +03:00
Check for ref before access scrollTop
This commit is contained in:
parent
f7489710a1
commit
fb88129ae7
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ function StatusPage({ id }) {
|
|||
useEffect(() => {
|
||||
const onScroll = debounce(() => {
|
||||
// console.log('onScroll');
|
||||
if (!scrollableRef.current) return;
|
||||
const { scrollTop } = scrollableRef.current;
|
||||
states.scrollPositions.set(id, scrollTop);
|
||||
}, 100);
|
||||
|
|
Loading…
Reference in a new issue