Skip to content

Commit

Permalink
fix: Salesforce owner check, handle no contact email (calcom#17834)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeauyeung authored Nov 25, 2024
1 parent 7e0c684 commit aea8588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app-store/_utils/CRMRoundRobinSkip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function getCRMContactOwnerForRRLeadSkip(
const contact = await crmManager.getContacts({ emails: bookerEmail, forRoundRobinSkip: true });
const endTime = performance.now();
logger.info(`Fetching from CRM took ${endTime - startTime}ms`);
if (!contact?.length || !contact[0].email) return nullReturnValue;
if (!contact?.length || !contact[0].ownerEmail) return nullReturnValue;
return { email: contact[0].ownerEmail ?? null, recordType: contact[0].recordType ?? null, crmAppSlug };
}

Expand Down

0 comments on commit aea8588

Please sign in to comment.