Skip to content

Commit

Permalink
refactor: remove else block from strict filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-corson-ibigroup committed Oct 11, 2023
1 parent e6dff22 commit 8a26d35
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/actions/apiV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ export function routingQuery(searchId = null, updateSearchInReducer) {
(am) => SIMPLIFICATIONS[am.mode]
)

let filteredItineraries
let filteredItineraries = itineraries
// If "strictItineraryFiltering" is enabled, only return itineraries that contain at least one explicitly requested mode...
if (strictModes) {
filteredItineraries = itineraries.filter((itin) =>
Expand All @@ -939,8 +939,6 @@ export function routingQuery(searchId = null, updateSearchInReducer) {
)
)
// ... Otherwise return all itineraries.
} else {
filteredItineraries = itineraries
}

// Filter itineraries to collapse short names and hide unnecessary errors.
Expand Down

0 comments on commit 8a26d35

Please sign in to comment.