aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/models/video/formatter/video-format-utils.ts4
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 6b1e59063..ab4cf53a8 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