From 35d50b7dd26b3cf646b8845784927bb1ef18dfb3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 5 Oct 2018 17:07:13 +0200 Subject: Fix videos list when page is empty --- client/src/app/shared/video/abstract-video-list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/src/app/shared/video') 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) { -- cgit v1.2.3