Merge pull request #1654 from Bnyro/master

fix nextpage = undefined
This commit is contained in:
Bnyro 2022-11-01 15:58:06 +01:00 committed by GitHub
commit b41800cad3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,7 @@ export default {
});
},
handleScroll() {
if (this.loading || !this.channel || !this.channel.nextpage) return;
if (this.loading || !this.channel) return;
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - window.innerHeight) {
this.loading = true;
if (this.selectedTab == 0) {
@ -153,6 +153,7 @@ export default {
}
},
fetchChannelNextPage() {
if (!this.channel.nextpage) return;
this.fetchJson(this.apiUrl() + "/nextpage/channel/" + this.channel.id, {
nextpage: this.channel.nextpage,
}).then(json => {
@ -163,6 +164,7 @@ export default {
});
},
fetchChannelTabNextPage() {
if (!this.tabNextPage) return;
this.fetchJson(this.apiUrl() + "/channels/tabs", {
data: this.tabs[this.selectedTab].data,
nextpage: this.tabNextPage,