From 6a99b930c4669b9c7a584518200e02714e0fde5f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 15 Dec 2020 13:45:36 +0100 Subject: [PATCH] followup: use arrow function for sorting Signed-off-by: Thomas Lamprecht --- docs/prune-simulator/prune-simulator.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/prune-simulator/prune-simulator.js b/docs/prune-simulator/prune-simulator.js index fd68b796..37d97e2c 100644 --- a/docs/prune-simulator/prune-simulator.js +++ b/docs/prune-simulator/prune-simulator.js @@ -449,11 +449,8 @@ Ext.onReady(function() { }); }); - // ordering here and iterating backwards through days - // ensures that everything is ordered - timesOnSingleDay.sort(function(a, b) { - return b - a; - }); + // sort recent times first, backups array below is ordered now -> past + timesOnSingleDay.sort((a, b) => b - a) let backups = [];