1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-13 13:50:27 +05:30

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() {
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,