From 8439d563392c6838c8a543a1512dde2a5762cd81 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 15 May 2015 13:45:04 +0200 Subject: [PATCH] use Ox.sort --- static/js/uploadVideoDialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/uploadVideoDialog.js b/static/js/uploadVideoDialog.js index dabb07ca..2f09e748 100644 --- a/static/js/uploadVideoDialog.js +++ b/static/js/uploadVideoDialog.js @@ -223,8 +223,8 @@ pandora.ui.uploadVideoDialog = function(data) { var height = info.video && info.video.length ? info.video[0].height : Ox.max(pandora.site.video.resolutions), - resolution = pandora.site.video.resolutions - .sort().filter(function(resolution) { + resolution = Ox.sort(pandora.site.video.resolutions) + .filter(function(resolution) { return height <= resolution; })[0] || Ox.max(pandora.site.video.resolutions); return resolution;