chatwoot/app/javascript/dashboard
Konstantin Vasilev 7820739f3a
fix: prevent Country from being set to Zimbabwe in the contacts list (#14078)
## Description

This PR resolves an issue that was causing Zimbabwe country being
selected in the Contacts list.
The root cause is objects in `countries.json` file are missing the
`code` property which was causing the countries map to always have the
last country in the list also map to an `undefined` key. In turn, this
was causing an error when contact's `country` was undefined.

Additional thing to keep in mind: I am not sure if there is a case when
contact's `country` property is used or if it can be removed as well,
but in my Chatwoot installation contacts only have a `countryCode`
property, and there is no way to set `country` from the widget sdk.

Fixes #7822

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

Simply running the vue application locally targeting my live chatwoot
API.

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2026-04-28 11:36:40 +05:30
..
api feat: allow disabling 2FA with a backup code (#14102) 2026-04-28 10:09:41 +07:00
assets fix(ui): resolve unreadable select options in dark mode (#13207) 2026-03-30 13:05:28 +05:30
components fix: clean up conversation list rendering (#14107) 2026-04-20 15:48:06 +05:30
components-next fix: prevent Country from being set to Zimbabwe in the contacts list (#14078) 2026-04-28 11:36:40 +05:30
composables chore: update conversation sidebar interactions (#13988) 2026-04-20 13:08:19 +05:30
constants feat(v5): New expanded layout for chatlist (#13652) 2026-04-20 14:02:10 +05:30
helper feat: onboarding account details with enriched data [UPM-17][UPM-18] (#13979) 2026-04-28 10:35:51 +05:30
i18n feat: onboarding account details with enriched data [UPM-17][UPM-18] (#13979) 2026-04-28 10:35:51 +05:30
mixins feat: allow configuring attachment upload limit (#12835) 2025-11-17 14:03:08 -08:00
modules fix: prevent template picker dropdown cut-off in compose form (#14129) 2026-04-22 17:13:26 +05:30
routes feat: onboarding account details with enriched data [UPM-17][UPM-18] (#13979) 2026-04-28 10:35:51 +05:30
store feat: onboarding account details with enriched data [UPM-17][UPM-18] (#13979) 2026-04-28 10:35:51 +05:30
stores feat: Voice Channel (#11602) 2025-12-19 12:41:33 -08:00
App.vue feat: onboarding account details with enriched data [UPM-17][UPM-18] (#13979) 2026-04-28 10:35:51 +05:30
featureFlags.js feat(captain): Add paywall and expose Custom Tools (#13977) 2026-04-07 10:58:29 +05:30