From d09d82c4ce2e62f67372fd2740e0f4044e6348e8 Mon Sep 17 00:00:00 2001 From: Luke Karis Date: Thu, 10 Mar 2022 21:59:38 -0800 Subject: [PATCH] Add secondary sorting by name --- assets/js/utility/api-events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/utility/api-events.js b/assets/js/utility/api-events.js index 56b7c4743c..d2b0ebce4d 100644 --- a/assets/js/utility/api-events.js +++ b/assets/js/utility/api-events.js @@ -84,7 +84,7 @@ function filterDataFromApi(responseData) { function sortData(filteredData) { for (const [key, value] of Object.entries(filteredData)) { value.sort(function (a, b) { - return convertTime12to24(a.start) - convertTime12to24(b.start); + return convertTime12to24(a.start) - convertTime12to24(b.start) || a.name.localeCompare(b.name); }); } return filteredData;