What's the bug??

async findCustomer(customer: FindCustomerParams, location: string) {
 if (customer.type === "reference") {
 return this.\_customersRepository.getById(customer.id);
 }

 if (customer.phone) {
 const result = await this.\_customersRepository.findByPhoneAndLocation(customer.phone, location);

 if (result) {
 return result;
 }
 }

 if (customer.email) {
 const result = await this.\_customersRepository.findByEmailAndLocation(customer.email, location);

 if (result && result.phone) {
 return result;
 }
 }

 return undefined;
 }
user