Skip to content

fix(phone): prevent crash when country locale list is empty#703

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/phone-utils-empty-list-crash
May 12, 2026
Merged

fix(phone): prevent crash when country locale list is empty#703
bmc08gt merged 1 commit into
code/cashfrom
fix/phone-utils-empty-list-crash

Conversation

@bmc08gt
Copy link
Copy Markdown
Collaborator

@bmc08gt bmc08gt commented May 12, 2026

PhoneUtils.init called .first() on countryLocales after filtering to entries with flag drawables. If no flags resolved, the list was empty causing NoSuchElementException and a fatal crash on launch.

Use .firstOrNull() with a fallback CountryLocale from the device locale instead.

PhoneUtils.init called .first() on countryLocales after filtering
to entries with flag drawables. If no flags resolved, the list was
empty causing NoSuchElementException and a fatal crash on launch.

Use .firstOrNull() with a fallback CountryLocale from the device
locale instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bmc08gt bmc08gt self-assigned this May 12, 2026
@github-actions github-actions Bot added type: fix Bug fix area: auth Login, session, access keys, identity labels May 12, 2026
@bmc08gt bmc08gt merged commit 008f752 into code/cash May 12, 2026
3 checks passed
@bmc08gt bmc08gt deleted the fix/phone-utils-empty-list-crash branch May 12, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth Login, session, access keys, identity type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant