diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index b1568432d..06c6da3f4 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -12,6 +12,7 @@ jobs: - uses: codespell-project/actions-codespell@master with: check_filenames: true + ignore_words_list: MapPin # skip git, yarn, pixel test script and HAR file, and all i18n resources. # Also, the a11y test file has a false positive and the ignore list does not work # see https://github.com/opentripplanner/otp-react-redux/pull/436/checks?check_run_id=3369380014 diff --git a/lib/actions/apiV2.js b/lib/actions/apiV2.js index fd0042f3d..b51cf1cbc 100644 --- a/lib/actions/apiV2.js +++ b/lib/actions/apiV2.js @@ -1005,6 +1005,10 @@ export function routingQuery(searchId = null, updateSearchInReducer) { // This is likely due to the fact that BICYCLE_RENT is treated as a transit submode. const combinations = modes ? [baseQuery] : generateCombinations(baseQuery) + if (combinations.length === 0) { + return RoutingQueryCallResult.INVALID_MODE_SELECTION + } + dispatch( routingRequest({ activeItinerary, @@ -1171,9 +1175,7 @@ export function routingQuery(searchId = null, updateSearchInReducer) { dispatch(updateOtpUrlParams(state, searchId)) } - return combinations.length === 0 - ? RoutingQueryCallResult.INVALID_MODE_SELECTION - : RoutingQueryCallResult.SUCCESS + return RoutingQueryCallResult.SUCCESS } }