Skip to content

Conversation

miles-grant-ibigroup
Copy link
Collaborator

Description:
Uses new core utils functions to support new Fares V2 Table and display

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

@miles-grant-ibigroup miles-grant-ibigroup self-assigned this Aug 27, 2025
@miles-grant-ibigroup miles-grant-ibigroup removed their assignment Aug 28, 2025
@miles-grant-ibigroup
Copy link
Collaborator Author

This is now ready for review @daniel-heppner-ibigroup

Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! I only have the one comment, of course on the ts-expect-error. Please fix!


if (
// Display special message if there are multiple fare products, but no primary product configured
// @ts-expect-error TS seems to not understand the optional?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS understands the optional, but you you can't use a > operator on undefined because it needs two numbers. So you need to provide a default value for leg.fareProducts?.length by using ?? 0 or something. Or do a null check some other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants