fix: race conditions when when loading lots of videos quickly

This commit is contained in:
Bnyro
2024-06-15 14:15:08 +02:00
parent a57448a411
commit b009b2a87d
5 changed files with 11 additions and 13 deletions

View File

@@ -131,8 +131,8 @@ export default {
if (!this.videosStore) return;
this.currentVideoCount = Math.min(this.currentVideoCount + this.videoStep, this.videosStore.length);
if (this.videos.length != this.videosStore.length) {
this.fetchDeArrowContent(this.videosStore.slice(this.videos.length, this.currentVideoCount));
this.videos = this.videosStore.slice(0, this.currentVideoCount);
this.fetchDeArrowContent(this.videos);
}
},
handleScroll() {