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); }