Fix NPE when comments are minimized.

This commit is contained in:
Kavin 2022-10-24 10:49:13 +01:00
parent e211f80c20
commit 4dc73e76c1
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -487,7 +487,7 @@ export default {
}, },
handleScroll() { handleScroll() {
if (this.loading || !this.comments || !this.comments.nextpage) return; 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.loading = true;
this.fetchJson(this.apiUrl() + "/nextpage/comments/" + this.getVideoId(), { this.fetchJson(this.apiUrl() + "/nextpage/comments/" + this.getVideoId(), {
nextpage: this.comments.nextpage, nextpage: this.comments.nextpage,