Skip to content

Conversation

@dschom
Copy link
Contributor

@dschom dschom commented Jan 23, 2026

Still testing, but pushed for collaboration purposes.

Because

This pull request

Issue that this pull request solves

Closes: (issue number)

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

account(account: {
uid: string;
email: string;
emails: Array<{ isPrimary: boolean; isVerified: boolean; email: string }>;
Copy link
Contributor

Choose a reason for hiding this comment

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

For most cases, emails will be defined, but it's not guaranteed, should this be an optional ? and handle if it's not populated. Otherwise we run the risk of a cannot access property find of 'undefined' when filtering.

Also, and this is something I can add, but at least one place for account creation we get back an object with account.primaryEmail.email but I'm unsure if we'll see that elsewhere. I'd assume priority is primaryEmail -> emails -> email

} {
return {
location: {
stateCode: request.app.geo.location?.state || '',
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a small helper for this too, but maybe since this is the only place it'd be used it can be removed meow? https://github.com/mozilla/fxa/blob/main/packages/fxa-shared/lib/geo-data.ts

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