diff options
-rw-r--r-- | server/models/video/formatter/video-format-utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/formatter/video-format-utils.ts b/server/models/video/formatter/video-format-utils.ts index 3310b3b46..8a54de3b0 100644 --- a/server/models/video/formatter/video-format-utils.ts +++ b/server/models/video/formatter/video-format-utils.ts | |||
@@ -205,7 +205,7 @@ function videoFilesModelToFormattedJSON ( | |||
205 | ? video.getTrackerUrls() | 205 | ? video.getTrackerUrls() |
206 | : [] | 206 | : [] |
207 | 207 | ||
208 | return [ ...videoFiles ] | 208 | return (videoFiles || []) |
209 | .filter(f => !f.isLive()) | 209 | .filter(f => !f.isLive()) |
210 | .sort(sortByResolutionDesc) | 210 | .sort(sortByResolutionDesc) |
211 | .map(videoFile => { | 211 | .map(videoFile => { |
@@ -240,7 +240,7 @@ function addVideoFilesInAPAcc ( | |||
240 | ) { | 240 | ) { |
241 | const trackerUrls = video.getTrackerUrls() | 241 | const trackerUrls = video.getTrackerUrls() |
242 | 242 | ||
243 | const sortedFiles = [ ...files ] | 243 | const sortedFiles = (files || []) |
244 | .filter(f => !f.isLive()) | 244 | .filter(f => !f.isLive()) |
245 | .sort(sortByResolutionDesc) | 245 | .sort(sortByResolutionDesc) |
246 | 246 | ||