I am consistently getting the following error when attempting to use the UsAutocompleteProClient.
ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'map')
TypeError: Cannot read properties of undefined (reading 'map')
at buildSuggestionsFromResponse (Client.js:56:31)
It appears that this function is checking for the payload.suggestions to be null but it should also be doing a check for undefined.
function buildSuggestionsFromResponse(payload) {
if (payload.suggestions === null) return [];
return payload.suggestions.map(suggestion => new Suggestion(suggestion));
}
I am consistently getting the following error when attempting to use the UsAutocompleteProClient.
It appears that this function is checking for the payload.suggestions to be null but it should also be doing a check for undefined.
I was essentially attempting to use a simple example like what can be found at https://github.com/smarty/smartystreets-javascript-sdk/blob/master/examples/us_autocomplete_pro.js