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() {
|
function handleScroll() {
|
||||||
if (discussionElement) {
|
if (discussionElement) {
|
||||||
const negativeCommentHeight = (-1 * commentElement.offsetHeight);
|
const negativeCommentHeight = commentElement && (-1 * commentElement.offsetHeight);
|
||||||
const isAtRecent = discussionElement.scrollTop >= negativeCommentHeight;
|
const isAtRecent = negativeCommentHeight && (discussionElement.scrollTop >= negativeCommentHeight);
|
||||||
|
|
||||||
setScrollBottom(isAtRecent);
|
setScrollBottom(isAtRecent);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue