Skip to content

Commit

Permalink
Sort timetable entries by date and time
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmarcel committed Sep 12, 2021
1 parent 4bb1a6c commit decd61b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/fetch_timetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const fetchTimetable = async (serverHostname, loginName, authCookieString, start
entry.lsNumber = entryJSON["lsnumber"];

return entry;
});
}).sort((a, b) => (a.date.getTime() === b.date.getTime()) ? (a.startTime - b.startTime) : (a.date - b.date));

return entries;
}
Expand Down

0 comments on commit decd61b

Please sign in to comment.