From c6fdc18559c3e514f0231d2dc3a54a558353378f Mon Sep 17 00:00:00 2001 From: Simeon Darakchiev Date: Thu, 1 Aug 2024 15:10:48 +0300 Subject: [PATCH] Fixed LookupV2 search --- src/ts/address-search.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ts/address-search.ts b/src/ts/address-search.ts index 17b851e..f4c8ab2 100644 --- a/src/ts/address-search.ts +++ b/src/ts/address-search.ts @@ -705,6 +705,10 @@ export default class AddressValidation { this.currentSearchTerm = this.currentSearchTerm.trim(); } + if (this.currentSearchTerm.includes('locality', 0) || this.currentSearchTerm.includes('postal_code', 0)) { + this.avMode = AddressValidationMode.LOOKUPV2; + } + // Fire an event before a search takes place this.events.trigger('pre-search', this.currentSearchTerm);