Skip to content

Commit

Permalink
Remove repeated code
Browse files Browse the repository at this point in the history
  • Loading branch information
armine-fliplet committed Dec 5, 2024
1 parent fd8fb4e commit d161532
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/components/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,10 @@ Fliplet.FormBuilder.field('map', {
const timeout = this.mapField.getGeocoder() ? 0 : 3000;

setTimeout(() => {
if (this.mapField.getTotalAddress()) {
this.value = this.mapField.getTotalAddress();
const address = this.mapField.getTotalAddress();

if (address) {
this.value = address;
}

this.updateAddressSuggestions();
Expand Down

0 comments on commit d161532

Please sign in to comment.