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

[BUG] Faulty if statement on this.data.house_number #60

Open
iwanvanzijderveld opened this issue Oct 9, 2024 · 0 comments
Open

[BUG] Faulty if statement on this.data.house_number #60

iwanvanzijderveld opened this issue Oct 9, 2024 · 0 comments

Comments

@iwanvanzijderveld
Copy link

The if statement to check if postcode and house_number are filled in appears to be faulty.

I get the following error in vendor/tig/postcode-magento2/view/base/web/js/postcode-handler/postcode-nl.js

jQuery.Deferred exception: this.data.house_number.match(...) is null

The if statement determines if the postcode and house_number are a string, but the string could still be empty.
When running the following regex expression, the result of match would be null so you get an error when selecting the first element in the array.

this.data.house_number.match(/^\d+/)[0])

Screenshots
image
image

  • Magento version: 2.4.5-p9
  • PHP version: [8.1]
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

1 participant