From 0eb284edc63ff2cc5e87047c9cff46ac36a1bb75 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Tue, 7 Sep 2021 12:08:39 +0200 Subject: [PATCH] ui: prune: fix order of keep reasons This is the same as fix 40ff84b138bb7127ecc05a2f587cca4e7a917810 in proxmox-backup. When returning a boolean instead of the expected {negative, 0, positive}, the behavior is browser-dependent. Signed-off-by: Fabian Ebner --- www/manager6/window/Prune.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/www/manager6/window/Prune.js b/www/manager6/window/Prune.js index f503773d..3056ab20 100644 --- a/www/manager6/window/Prune.js +++ b/www/manager6/window/Prune.js @@ -63,9 +63,7 @@ Ext.define('PVE.PruneInputPanel', { ]; let counter = {}; - backups.sort(function(a, b) { - return a.ctime < b.ctime; - }); + backups.sort((a, b) => b.ctime - a.ctime); let ruleIndex = -1; let nextRule = function() { -- 2.39.5