From: Chocobozzz Date: Wed, 3 Feb 2021 08:57:47 +0000 (+0100) Subject: Fix get video from redudancy X-Git-Tag: v3.1.0-rc.1~186 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=2e1e4af03bc9ccd2470a9f293d70dc27596aae24;p=github%2FChocobozzz%2FPeerTube.git Fix get video from redudancy --- diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index 74895fe30..53293df37 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts @@ -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 }