Skip to content

Commit

Permalink
Merge pull request #82 from lemonyte/sort-schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonyte authored Jun 8, 2024
2 parents 509b103 + 2136c86 commit 093fc23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ferry_planner/static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,9 @@ function onPlanSelected(id) {
export function sortPlans(sortBy) {
if (sortBy === currentSort) return;
plans.sort((a, b) => {
if (a[sortBy] >= b[sortBy]) return 1;
return -1;
if (a[sortBy] > b[sortBy]) return 1;
if (a[sortBy] < b[sortBy]) return -1;
return 0;
});
currentSort = sortBy;
elements.sortOption.value = sortBy;
Expand Down

0 comments on commit 093fc23

Please sign in to comment.