Add check to ensure videos are present before fetching more items.

This commit is contained in:
Kavin 2023-05-05 00:41:59 +01:00
parent d320cca0d9
commit 96a57b805d
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -115,7 +115,7 @@ export default {
if (window.innerHeight + window.scrollY >= document.body.offsetHeight - window.innerHeight) {
if (this.loading) return;
if (this.videos == null) return;
if (this.videosCount % 100 != 0) return;
if (this.videosCount > 0 && this.videosCount % 100 != 0) return;
this.loading = true;
this.loadMoreVideos();