From 4907491af3ca57e9d352e20cf6384a89ec427453 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Thu, 12 Jan 2023 21:33:08 +0200 Subject: [PATCH] Fix check for user profile --- .../profile-functions/profile-factory/profile.factory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-ts/lib/profile-provider/profile-functions/profile-factory/profile.factory.ts b/src-ts/lib/profile-provider/profile-functions/profile-factory/profile.factory.ts index 13fe53fdd..4924d26ca 100644 --- a/src-ts/lib/profile-provider/profile-functions/profile-factory/profile.factory.ts +++ b/src-ts/lib/profile-provider/profile-functions/profile-factory/profile.factory.ts @@ -15,7 +15,7 @@ export function create(profile: UserProfile, token: TokenModel, hasDiceEnabled: profile.isCustomer = !!token.roles?.some(role => role === UserRole.customer) profile.isMember = !profile.isCustomer - profile.isWipro = profile.email.endsWith('@wipro.com') + profile.isWipro = profile.email?.endsWith('@wipro.com') profile.diceEnabled = hasDiceEnabled // store roles for custom capability checks