Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
karussell committed May 27, 2024
1 parent e8c8c63 commit 268b79e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/sidebar/RoutingResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ function RHButton(p: {
else if (p.type == 'border') tmpDescription = p.description + ': ' + p.values[index]
else if (p.values && p.values[index]) {
if (p.type.includes('rating'))
tmpDescription = p.description + ': ' + p.value + ' (' + p.type + ':' + p.values[index] + ')'
tmpDescription =
p.description + ': ' + p.value + ' (' + p.type + ':' + p.values[index] + ')'
else if (p.type.includes('steep')) tmpDescription = p.description + ': ' + p.values[index]
else tmpDescription = p.description + ': ' + p.value + ' ' + p.values[index]
} else tmpDescription = p.description + ': ' + p.value
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar/search/routingProfiles/RoutingProfiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function ({
// Now add the profiles to each key e.g. 'car_avoid_ferry' to the 'car_' key.
// Create a special key '_' for profile names with an unknown icon.
routingProfiles.forEach(p => {
const key = (Object.keys(icons).find(k => p.name.startsWith(k + '_')) || "") + "_"
const key = (Object.keys(icons).find(k => p.name.startsWith(k + '_')) || '') + '_'
if (!icons[p.name]) customProfiles[key] = [...(customProfiles[key] || []), p.name]
})

Expand Down
3 changes: 2 additions & 1 deletion src/stores/QueryStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ export default class QueryStore extends Store<QueryStoreState> {
if (
state.queryPoints.length === 2 &&
state.maxAlternativeRoutes > 1 &&
(ApiImpl.isMotorVehicle(state.routingProfile.name) && maxDistance < 7_000_000 || maxDistance < 500_000)
((ApiImpl.isMotorVehicle(state.routingProfile.name) && maxDistance < 7_000_000) ||
maxDistance < 500_000)
)
requests.push(QueryStore.buildRouteRequest(state))
}
Expand Down

0 comments on commit 268b79e

Please sign in to comment.