But because stripes-form is involved and it does something weird with exceptions, the error ("TypeError: Cannot read property 'alpha2' of undefined") just gets thrown away. (I eventually discovered it by tracing the code down into redux-form.)
There's no point fixing this in the current master, so I'll do it on my UIU-278 branch and it'll get merged to master soon. But more worrying is the underlying exception-swallowing problem, which is what concealed this and made it a difficult rather than a trivial problem. I will file a separate issue on that.
Yep, this is fixed: it's no longer possible to type in the name of a country, so you can't enter one that isn't recognised.
Cate Boerema April 6, 2018 at 11:36 AM
@Mike Taylor, you reported this. Can you please either provide repro steps for the testers or get it out of the In Review status (you can close it or mark it In Code Review or whatever is appropriate).
Ann-Marie Breaux April 4, 2018 at 2:48 PM
@Cate Boerema Should this be statused as In Code Review now?
Ann-Marie Breaux March 23, 2018 at 2:56 PM
Not clear if this is something that the ICs should test, If so, could someone lay out the test scenario a bit more clearly? Seems like it involves the country portion of the address block within users. Thank you!
John Coburn March 19, 2018 at 1:53 PM
The new <Selection> component is in place here - it enforces the system-known entity, behaving more like a native <select> component than a text input with mere suggestions. Marking for review.
I ran into this when testing address maintenance in the factored-out-code-code version of ui-users in the
UIU-278
branch.The problem is that if you just put "x" for the country, the code barfs when it goes to look that up in the line:
const countryId = (addr.country) ? countriesByName[addr.country].alpha2 : '';
But because stripes-form is involved and it does something weird with exceptions, the error ("TypeError: Cannot read property 'alpha2' of undefined") just gets thrown away. (I eventually discovered it by tracing the code down into redux-form.)
There's no point fixing this in the current
master
, so I'll do it on myUIU-278
branch and it'll get merged to master soon. But more worrying is the underlying exception-swallowing problem, which is what concealed this and made it a difficult rather than a trivial problem. I will file a separate issue on that.