From: Chocobozzz Date: Mon, 19 Mar 2018 14:37:31 +0000 (+0100) Subject: Fix resolution order X-Git-Tag: v1.0.0-alpha.9~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=552586eda61f340515505182fc33c70469c03a2f;p=oweals%2Fpeertube.git Fix resolution order --- diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 78789ba2c..4e175c410 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -990,8 +990,8 @@ export class VideoModel extends Model { } }) .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 })