]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix get video from redudancy
authorChocobozzz <me@florianbigard.com>
Wed, 3 Feb 2021 08:57:47 +0000 (09:57 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 3 Feb 2021 08:57:47 +0000 (09:57 +0100)
server/models/redundancy/video-redundancy.ts

index 74895fe3030ffb3fd44927e60acf48340177754f..53293df378c9dcb85a0e0acede4ec7699c529834 100644 (file)
@@ -709,9 +709,9 @@ export class VideoRedundancyModel extends Model {
   }
 
   getVideo () {
-    if (this.VideoFile) return this.VideoFile.Video
+    if (this.VideoFile?.Video) return this.VideoFile.Video
 
-    if (this.VideoStreamingPlaylist.Video) return this.VideoStreamingPlaylist.Video
+    if (this.VideoStreamingPlaylist?.Video) return this.VideoStreamingPlaylist.Video
 
     return undefined
   }