Skip to content

Commit

Permalink
Merge pull request #82 from companieshouse/IDVA156-correspondence-add…
Browse files Browse the repository at this point in the history
…ress-autoLook-new

small fix added
  • Loading branch information
atedros-ch authored Feb 15, 2024
2 parents 42ffa21 + b7696a9 commit c1210ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const post = async (req: Request, res: Response, next: NextFunction) => {
const ukAddresses: UKAddress[] = await getUKAddressesFromPostcode(POSTCODE_ADDRESSES_LOOKUP_URL, postcode);
const correspondencePremise = req.body.premise;

if (correspondencePremise !== "") {
if (correspondencePremise !== "" && ukAddresses.find((address) => address.premise === correspondencePremise)) {
let address = {
premise: "",
addressLine1: "",
Expand Down

0 comments on commit c1210ea

Please sign in to comment.