Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
JozefVerhoef committed Mar 9, 2022
2 parents c7eb773 + 9006fca commit 7d1b805
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions assets/js/postcode-eu-autofill.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,10 @@
{
const addressPart = PostcodeNlAddressFieldMapping.mapping[key];

if (mappedValues.has(addressPart))
if (mappedValues.has(addressPart) && addressFields[key].length > 0)
{
addressFields[key]
.val(mappedValues.get(addressPart))
.trigger('change');
const field = addressFields[key].val(mappedValues.get(addressPart))[0];
field.dispatchEvent(new Event('change'));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion postcodenl-address-autocomplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Postcode.nl Address Autocomplete
* Plugin URI: https://www.postcode.nl/en/services/adresdata/implementatie
* Description: Reference implementation for Postcode.nl international address autocomplete for WooCommerce
* Version: 2.0.3
* Version: 2.0.4
* Author: Postcode.nl
* Author URI: https://www.postcode.nl
* Text Domain: postcodenl-address-autocomplete
Expand Down
2 changes: 1 addition & 1 deletion src/PostcodeNl/AddressAutocomplete/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Main
{
/** @var string The version number of the plugin should be equal to the commented version number in ../../../postcodenl-address-autocomplete.php */
public const VERSION = '2.0.3';
public const VERSION = '2.0.4';

/** @var self Reference to own */
protected static $_instance;
Expand Down

0 comments on commit 7d1b805

Please sign in to comment.