A little fix to a bug I just found.
When creating a new address and entering an invalid postal code, the search function returns an empty array, i.e. response.message is defined but response.message[0] is not. The function will then encounter an error on line 145 when it tries to access response.message[0].city. We can avoid this case by checking that the array is non-empty.
A little fix to a bug I just found. When creating a new address and entering an invalid postal code, the search function returns an empty array, i.e. response.message is defined but response.message[0] is not. The function will then encounter an error on line 145 when it tries to access response.message[0].city. We can avoid this case by checking that the array is non-empty.