react-simple-pull-to-refresh
react-simple-pull-to-refresh copied to clipboard
onSrolll: null is not an object (evaluating 'P.current.classList')
The following line is throwing an error due to containerRef.current being null.
react-simple-pull-to-refresh/build/index.esm.js in onScroll at line 258:26
/**
* Check if user breached fetchMoreThreshold
*/
if (canFetchMore && getScrollToBottomValue() < fetchMoreThreshold && onFetchMore) {
fetchMoreTresholdBreached = true;
containerRef.current.classList.add('ptr--fetch-more-treshold-breached'); <---- This line is throwing the error
onFetchMore().then(initContainer).catch(initContainer);
}
};
This can be triggered by the component getting unmounted during a scroll event.