Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open

Description

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /