mirror of
https://github.com/funamitech/mastodon
synced 2024-11-28 14:58:38 +09:00
fix(status_list): Guard against missing ref (#4353)
This commit is contained in:
parent
f52ce92f2b
commit
696bcff6bf
@ -31,6 +31,7 @@ export default class StatusList extends ImmutablePureComponent {
|
||||
intersectionObserverWrapper = new IntersectionObserverWrapper();
|
||||
|
||||
handleScroll = debounce(() => {
|
||||
if (this.node) {
|
||||
const { scrollTop, scrollHeight, clientHeight } = this.node;
|
||||
const offset = scrollHeight - scrollTop - clientHeight;
|
||||
this._oldScrollPosition = scrollHeight - scrollTop;
|
||||
@ -42,6 +43,7 @@ export default class StatusList extends ImmutablePureComponent {
|
||||
} else if (this.props.onScroll) {
|
||||
this.props.onScroll();
|
||||
}
|
||||
}
|
||||
}, 200, {
|
||||
trailing: true,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user