From 4dc73e76c1b56a9685b595d95d3f216d40bb1779 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 24 Oct 2022 10:49:13 +0100 Subject: [PATCH] Fix NPE when comments are minimized. --- src/components/WatchVideo.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index 0e7a497c..2c820e0a 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -487,7 +487,7 @@ export default { }, handleScroll() { if (this.loading || !this.comments || !this.comments.nextpage) return; - if (window.innerHeight + window.scrollY >= this.$refs.comments.offsetHeight - window.innerHeight) { + if (window.innerHeight + window.scrollY >= this.$refs.comments?.offsetHeight - window.innerHeight) { this.loading = true; this.fetchJson(this.apiUrl() + "/nextpage/comments/" + this.getVideoId(), { nextpage: this.comments.nextpage,