From e3a4f87fe4957fb00b3617086ff7a20fb6015496 Mon Sep 17 00:00:00 2001 From: clerie Date: Mon, 7 Jul 2025 16:35:07 +0200 Subject: [PATCH] Fix locations being sorted unlucky because legs are not filtered properly because of misspelled attributes --- web/drafting-board.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/drafting-board.js b/web/drafting-board.js index 2b212e1..22c3209 100644 --- a/web/drafting-board.js +++ b/web/drafting-board.js @@ -181,7 +181,7 @@ export function sortLocations(sorted_locations, unsorted_locations, legs) { let selected_location_id = getLocationWithLeastInboundTrips(unsorted_locations, legs); unsorted_locations = unsorted_locations.filter(location_id => location_id != selected_location_id); - legs = legs.filter(leg => leg.destination_id != selected_location_id && leg.origin_id != selected_location_id); + legs = legs.filter(leg => leg.destination_location_id != selected_location_id && leg.origin_location_id != selected_location_id); return sortLocations(sorted_locations.concat([ selected_location_id ]), unsorted_locations, legs); }