Skip to content

Commit

Permalink
fix: prevent fetching for name "undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
fterra-encora committed Oct 3, 2023
1 parent 75de0b7 commit 6c3baab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/src/components/grouping/AddressGroupComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ const postalCodeNaming = computed(() =>
const autoCompleteUrl = computed(
() =>
`/api/clients/addresses?country=${selectedValue.country.value}&maxSuggestions=10&searchTerm=${selectedValue.streetAddress}`
`/api/clients/addresses?country=${
selectedValue.country.value ?? ""
}&maxSuggestions=10&searchTerm=${selectedValue.streetAddress ?? ""}`,
);
const autoCompleteResult = ref<BusinessSearchResult | undefined>(
{} as BusinessSearchResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const selectedOption = computed(() => {
});
const autoCompleteUrl = computed(
() => `/api/clients/name/${formData.value.businessInformation.businessName}`
() => `/api/clients/name/${formData.value.businessInformation.businessName || ""}`
);
const showAutoCompleteInfo = ref<boolean>(false);
Expand Down

0 comments on commit 6c3baab

Please sign in to comment.