Skip to content
Snippets Groups Projects
Commit 722965d6 authored by Aleix Quintana's avatar Aleix Quintana
Browse files

Fix #3219807 : does not work and error in the console

parent a1747b33
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ Drupal.behaviors.address_js_geocoder = {
var autoupdate = $('input[data-drupal-selector="' + settings.address_selector + '-autogeocode"]', field_address_context).prop('checked')
parsed_address = `${add1} ${add2} ${locality} ${postal_code} ${country}`.replace(/ +/g, ' ');
$("[data-drupal-selector='" + settings.address_selector + "-container-resolved-address']", field_address_context).val(parsed_address)
if ( add1.length > 3 && locality.length > 2 && country.length > 1 && autoupdate){
if ( add1 && add1.length > 3 && locality && locality.length > 2 && country && country.length > 1 && autoupdate){
$("input[data-drupal-selector='" + settings.address_selector + "-request-geocode']", field_address_context).trigger("mousedown");
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment