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,