diff --git a/docs/integrations/github/org.md b/docs/integrations/github/org.md index 39532e806f..39b60c76c5 100644 --- a/docs/integrations/github/org.md +++ b/docs/integrations/github/org.md @@ -261,8 +261,8 @@ returned identity. async (user, ctx): Promise => { const entity = await defaultUserTransformer(user, ctx); - if (entity && user.organizationVerifiedDomainEmails) { - entity.spec.profile!.email = user.organizationVerifiedDomainEmails[0] || ''; + if (entity && user.organizationVerifiedDomainEmails?.length) { + entity.spec.profile!.email = user.organizationVerifiedDomainEmails[0]; } return entity;