Skip to content

Commit

Permalink
Only prefill if we actually have a prefill value
Browse files Browse the repository at this point in the history
  • Loading branch information
lotorvik committed Nov 28, 2024
1 parent 34eb332 commit 67de5c5
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ class Address extends BaseComponent {
this.getKontaktadresse(prefillAddresses);
}

if (prefillAddress.landkode) {
super.setValue({
...prefillAddress,
land: getCountryObject(prefillAddress.landkode),
});
} else {
this.setValue(prefillAddress);
if (prefillAddress) {
if (prefillAddress.landkode) {
super.setValue({
...prefillAddress,
land: getCountryObject(prefillAddress.landkode),
});
} else {
this.setValue(prefillAddress);
}
}
}
}
Expand Down

0 comments on commit 67de5c5

Please sign in to comment.