Skip to content

Commit a9be0d5

Browse files
fix: backwards compatibility for route extras
as older ors versions still return extras under 'waytypes' instead of 'waytype'
1 parent e75ca8a commit a9be0d5

File tree

1 file changed

+3
-0
lines changed
  • src/fragments/forms/map-form/components/place-and-directions/components/route-details

1 file changed

+3
-0
lines changed

src/fragments/forms/map-form/components/place-and-directions/components/route-details/route-details.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ export default {
7070
context.parseSegments(route.properties.segments)
7171
this.localMapViewData.routes[key].summary = route.summary
7272
}
73+
if (route.properties.extras?.['waytypes']) {
74+
delete Object.assign(route.properties.extras, {['waytype']: route.properties.extras['waytypes'] })['waytypes']
75+
}
7376
routes.push(route)
7477
}
7578
return routes

0 commit comments

Comments
 (0)