Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix videos list when page is empty

Chocobozzz35d50b7dd26b
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 6a758ebe02..7637911650 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -83,7 +83,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
pageByVideoId (index: number, page: Video[]) {
// Video are unique in all pages
- return page[0].id
+ return page.length !== 0 ? page[0].id : 0
}
videoById (index: number, video: Video) {