Default Country breaks component if it is updated to a empty string
Opened this issue · 0 comments
JuaniSilva commented
I have a computed property that updates de default country depending on the value we get passed but if no value is passed we send a empty string wich leads to the component to break by setting the activeCountry to undefined.
This happends because the watcher of defaultCountry
calls the choose
functions wich tries to find an element with the iso value of an empty string in allCountries
wich results on returning undefined.
This return value is used to set up activeCountry
value wich ends up breaking the component