Skip to content

Commit

Permalink
fix: mobile itinerary detail view no longer crashes if fares are not …
Browse files Browse the repository at this point in the history
…in use
  • Loading branch information
vesameskanen committed Jan 8, 2024
1 parent 67b2191 commit 1e8a851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/util/fareUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const shouldShowFareInfo = config =>
config.feedIds.some(feedId => config.availableTickets[feedId]);

export const shouldShowFarePurchaseInfo = (config, breakpoint, fares) => {
const unknownFares = fares.some(fare => fare.isUnknown);
const unknownFares = fares?.some(fare => fare.isUnknown);
// Windows phones or Huawei should only show ticket information.
const { userAgent } = navigator;
const huaweiPattern = /(?:huaweibrowser|huawei|emui|hmscore|honor)/i;
Expand Down

0 comments on commit 1e8a851

Please sign in to comment.