🐛(frontend) prevent Crisp crash when superuser has no email
Fix crash when switching from admin session to app with superuser account that lacks email field. Add null check to prevent Crisp initialization errors.
This commit is contained in:
committed by
aleb_the_flash
parent
04081f04fc
commit
26d668b478
@@ -7,7 +7,7 @@ export const initializeSupportSession = (user: ApiUser) => {
|
||||
if (!Crisp.isCrispInjected()) return
|
||||
const { id, email } = user
|
||||
Crisp.setTokenId(`meet-${id}`)
|
||||
Crisp.user.setEmail(email)
|
||||
if (email) Crisp.user.setEmail(email)
|
||||
}
|
||||
|
||||
export const terminateSupportSession = () => {
|
||||
|
||||
Reference in New Issue
Block a user