From 75923bc25ad9e8a3c4f4043a384df8027d39c8c9 Mon Sep 17 00:00:00 2001 From: minie4 Date: Tue, 28 Jun 2022 22:51:51 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Remove=20useless=20sorting?= =?UTF-8?q?=20of=20substitutions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/store.js b/src/store.js index 97e5c79..e8d2540 100644 --- a/src/store.js +++ b/src/store.js @@ -56,7 +56,7 @@ export const substitutionsForDate = computed(() => { if (!dates[date]) dates[date] = []; dates[substitution.date].push(substitution); } - return sortObject(dates); + return dates; }); export const parsedTimetable = computed(() => { @@ -159,12 +159,3 @@ export async function fetchHistory() { } fetchData(); - -function sortObject(obj) { - return Object.keys(obj) - .sort() - .reduce(function (result, key) { - result[key] = obj[key]; - return result; - }, {}); -}