From ced286854c59cb19f2f7eeae563e9df92d4d3790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 6 Jul 2015 17:04:55 +0200 Subject: [PATCH] Fixed sorting by size of file list (cherry picked from commit 6906584) --- src/octoprint/static/js/app/viewmodels/files.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/files.js b/src/octoprint/static/js/app/viewmodels/files.js index a5d50f8b..f87f9879 100644 --- a/src/octoprint/static/js/app/viewmodels/files.js +++ b/src/octoprint/static/js/app/viewmodels/files.js @@ -47,8 +47,8 @@ $(function() { }, "size": function(a, b) { // sorts descending - if (b["bytes"] === undefined || a["bytes"] > b["bytes"]) return -1; - if (a["bytes"] < b["bytes"]) return 1; + if (b["size"] === undefined || a["size"] > b["size"]) return -1; + if (a["size"] < b["size"]) return 1; return 0; } },