projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a797728
)
Fix resolution order
author
Chocobozzz
<me@florianbigard.com>
Mon, 19 Mar 2018 14:37:31 +0000
(15:37 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Mon, 19 Mar 2018 14:37:31 +0000
(15:37 +0100)
server/models/video/video.ts
patch
|
blob
|
history
diff --git
a/server/models/video/video.ts
b/server/models/video/video.ts
index 78789ba2c50a41f0fe773d03cba5678adebfd94d..4e175c410ee2d9ab0633da2a8dda088e7ec30e47 100644
(file)
--- a/
server/models/video/video.ts
+++ b/
server/models/video/video.ts
@@
-990,8
+990,8
@@
export class VideoModel extends Model<VideoModel> {
}
})
.sort((a, b) => {
- if (a.resolution
< b.resolution
) return 1
- if (a.resolution
=== b.resolution
) return 0
+ if (a.resolution
.id < b.resolution.id
) return 1
+ if (a.resolution
.id === b.resolution.id
) return 0
return -1
})