misc: empty geolocation prefilled fields on empty response (#26219) #716
|
@ -130,7 +130,11 @@ $(function() {
|
|||
var widget_name = $(event.target).parents('div.widget').data('widget-name');
|
||||
$.getJSON(WCS_ROOT_URL + '/api/reverse-geocoding?lat=' + coords.lat + '&lon=' + coords.lng, function(data) {
|
||||
unset_sync_callback()
|
||||
if (data.err) return;
|
||||
if (data === null) {
|
||||
data = {address: {road: undefined, house_number: undefined}}
|
||||
} else if (data.err) {
|
||||
return
|
||||
}
|
||||
|
||||
var $prefilled_by_id = $('div[data-geolocation="address-id"]');
|
||||
if ($prefilled_by_id.length) {
|
||||
|
|
Loading…
Reference in New Issue