Skip to content
Extraits de code Groupes Projets
Valider 696bcff6 rédigé par Sorin Davidoi's avatar Sorin Davidoi Validation de Eugen Rochko
Parcourir les fichiers

fix(status_list): Guard against missing ref (#4353)

parent f52ce92f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -31,16 +31,18 @@ export default class StatusList extends ImmutablePureComponent { ...@@ -31,16 +31,18 @@ export default class StatusList extends ImmutablePureComponent {
intersectionObserverWrapper = new IntersectionObserverWrapper(); intersectionObserverWrapper = new IntersectionObserverWrapper();
handleScroll = debounce(() => { handleScroll = debounce(() => {
const { scrollTop, scrollHeight, clientHeight } = this.node; if (this.node) {
const offset = scrollHeight - scrollTop - clientHeight; const { scrollTop, scrollHeight, clientHeight } = this.node;
this._oldScrollPosition = scrollHeight - scrollTop; const offset = scrollHeight - scrollTop - clientHeight;
this._oldScrollPosition = scrollHeight - scrollTop;
if (250 > offset && this.props.onScrollToBottom && !this.props.isLoading) {
this.props.onScrollToBottom(); if (250 > offset && this.props.onScrollToBottom && !this.props.isLoading) {
} else if (scrollTop < 100 && this.props.onScrollToTop) { this.props.onScrollToBottom();
this.props.onScrollToTop(); } else if (scrollTop < 100 && this.props.onScrollToTop) {
} else if (this.props.onScroll) { this.props.onScrollToTop();
this.props.onScroll(); } else if (this.props.onScroll) {
this.props.onScroll();
}
} }
}, 200, { }, 200, {
trailing: true, trailing: true,
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter