From 5c4fe892430632234a1835367e12e0aa609e2d9f Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Fri, 5 Apr 2024 05:29:50 +0000 Subject: [PATCH] fix: nullable email identity in posthog --- src/utils/identify-user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/identify-user.ts b/src/utils/identify-user.ts index c961254b..8ec6b474 100644 --- a/src/utils/identify-user.ts +++ b/src/utils/identify-user.ts @@ -7,7 +7,7 @@ export const identifyUser = ( ) => { let properties = { name: identity?.displayName, - email: identity?.linkedAccounts[0].email.email, + email: identity?.linkedAccounts.find(x => x.email)?.email?.email, avatar: identity?.avatarUrl };