Merge pull request #17927 from mikebryant/m/fix-org-integration-docs

docs: Fix example to not produce validation errors
This commit is contained in:
Fredrik Adelöw
2023-05-25 12:08:36 +02:00
committed by GitHub
+2 -2
View File
@@ -261,8 +261,8 @@ returned identity.
async (user, ctx): Promise<UserEntity | undefined> => {
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;