]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/video/abstract-video-list.ts
Merge branch 'release/v1.0.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / video / abstract-video-list.ts
index 6a758ebe02412338f1ac997f6ce886c0fa4d7069..1f43f974c372f7446557755fed44343847097f70 100644 (file)
@@ -37,6 +37,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
   videoPages: Video[][] = []
   ownerDisplayType: OwnerDisplayType = 'account'
   firstLoadedPage: number
+  displayModerationBlock = false
 
   protected baseVideoWidth = 215
   protected baseVideoHeight = 205
@@ -83,7 +84,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) {
@@ -160,6 +161,10 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
     )
   }
 
+  toggleModerationDisplay () {
+    throw new Error('toggleModerationDisplay is not implemented')
+  }
+
   protected hasMoreVideos () {
     // No results
     if (this.pagination.totalItems === 0) return false