Fix error with other videos displayed
authorChocobozzz <me@florianbigard.com>
Thu, 8 Feb 2018 09:19:09 +0000 (10:19 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 8 Feb 2018 09:19:09 +0000 (10:19 +0100)
client/src/app/videos/+video-watch/video-watch.component.ts

index a281fff2364c35f919377c4541268a306f032d4b..8330aba15d5269cb3bb2e599ba47564e47ed56a8 100644 (file)
@@ -405,7 +405,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
   }
 
   private updateOtherVideosDisplayed () {
-    if (this.otherVideos.length > 0) {
+    if (this.video && this.otherVideos && this.otherVideos.length > 0) {
       this.otherVideosDisplayed = this.otherVideos.filter(v => v.uuid !== this.video.uuid)
     }
   }