Skip to content

Commit

Permalink
fix(trip-planner): Check if waypoint.routes exists before anything
Browse files Browse the repository at this point in the history
  • Loading branch information
DailisLangovskis authored and raitisbe committed Aug 6, 2021
1 parent d0ccc79 commit bc35d75
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class HsTripPlannerService {
const wp: Waypoint = getWaypoint(feature);
if (wp) {
tmp = wp.name;
if (wp.routes.to) {
if (wp?.routes?.to) {
tmp += ` (${this.formatDistance(wp, 'to')})`;
}
}
Expand Down

0 comments on commit bc35d75

Please sign in to comment.