Problem
The Country selection screen can fail to load — it shows an error instead of the list of countries when it is opened without a country already selected (for example, when the app is relaunched while that screen was open, or the screen is reached via a direct link). When this happens the user cannot pick a country.
Reproduction Steps
Observed in production on iOS.
- Go to Settings > Profile > Personal Details > Address.
- Tap the Country field to open the country selector.
- Force-quit the app while the country selector is the active screen.
- Relaunch the app (navigation state restores the country selector).
Expected Behavior: The country list loads and a country can be selected.
Actual Behavior: The screen errors and the country list does not render.
Solution
The screen should tolerate the navigation parameters being absent (treat it as "no country selected") instead of erroring.
Extra context
Sentry: APP-G8Y — TypeError: Cannot read property 'country' of undefined, culprit DynamicCountrySelectionPage. First seen 2026-06-25, 7 events / 1 user, handled: yes (caught by the error boundary). Telemetry shows the error firing ~8s after a cold start, which points to navigation state restoration landing on the screen with no params.
Root cause: DynamicCountrySelectionPage reads route.params.country directly, but React Navigation hands back undefined params when the screen is entered with none, so the property read throws. Everything downstream already tolerates an undefined country, so the fix is a single optional chain (route.params?.country).
– written by Claude on Ben's behalf
Problem
The Country selection screen can fail to load — it shows an error instead of the list of countries when it is opened without a country already selected (for example, when the app is relaunched while that screen was open, or the screen is reached via a direct link). When this happens the user cannot pick a country.
Reproduction Steps
Observed in production on iOS.
Expected Behavior: The country list loads and a country can be selected.
Actual Behavior: The screen errors and the country list does not render.
Solution
The screen should tolerate the navigation parameters being absent (treat it as "no country selected") instead of erroring.
Extra context
Sentry: APP-G8Y —
TypeError: Cannot read property 'country' of undefined, culpritDynamicCountrySelectionPage. First seen 2026-06-25, 7 events / 1 user,handled: yes(caught by the error boundary). Telemetry shows the error firing ~8s after a cold start, which points to navigation state restoration landing on the screen with no params.Root cause:
DynamicCountrySelectionPagereadsroute.params.countrydirectly, but React Navigation hands backundefinedparams when the screen is entered with none, so the property read throws. Everything downstream already tolerates an undefined country, so the fix is a single optional chain (route.params?.country).– written by Claude on Ben's behalf