From: Chocobozzz Date: Fri, 5 Oct 2018 15:07:13 +0000 (+0200) Subject: Fix videos list when page is empty X-Git-Tag: v1.1.0-alpha.1~43 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=35d50b7dd26b3cf646b8845784927bb1ef18dfb3;p=oweals%2Fpeertube.git Fix videos list when page is empty --- diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 6a758ebe0..763791165 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) {