lint
This commit is contained in:
parent
52f15df5a3
commit
2fcc57dbba
1 changed files with 2 additions and 2 deletions
|
@ -84,8 +84,8 @@ export default function LivestreamComments(props: Props) {
|
|||
|
||||
function handleScroll() {
|
||||
if (discussionElement) {
|
||||
const negativeCommentHeight = (-1 * commentElement.offsetHeight);
|
||||
const isAtRecent = discussionElement.scrollTop >= negativeCommentHeight;
|
||||
const negativeCommentHeight = commentElement && (-1 * commentElement.offsetHeight);
|
||||
const isAtRecent = negativeCommentHeight && (discussionElement.scrollTop >= negativeCommentHeight);
|
||||
|
||||
setScrollBottom(isAtRecent);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue