Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning undefined in the city field #5

Open
meloluan opened this issue Feb 18, 2021 · 2 comments
Open

Returning undefined in the city field #5

meloluan opened this issue Feb 18, 2021 · 2 comments

Comments

@meloluan
Copy link

Testing some zip code variations, the code returns zip not found or fills the city as "undefined".

Example: CEP - 36600133

@JonasJs
Copy link
Owner

JonasJs commented Mar 23, 2021

@meloluan If the postal code is not found, we provide a callback function so that you can better handle the error

Ex: <AdressAutocomplete on:callback={handleCallback} />

function handleCallback({detail}) {
  if(detail.data){
    address = detail.data;
  } else {
    alert("Zip not found!");
  }
}

@doolijb
Copy link

doolijb commented Aug 28, 2021

Trying valid Spokane area zip codes. All result in error. Same on demo sites. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants