mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +00:00
treat user emailContact as optional
This commit is contained in:
parent
2ed44c315a
commit
1b049ce4e1
@ -114,19 +114,19 @@ export class GmsUser {
|
||||
private getGmsCountryCode(user: dbUser): string | undefined {
|
||||
if (
|
||||
user.gmsAllowed &&
|
||||
(user.emailContact.gmsPublishPhone === GmsPublishPhoneType.GMS_PUBLISH_PHONE_COUNTRY ||
|
||||
user.emailContact.gmsPublishPhone === GmsPublishPhoneType.GMS_PUBLISH_PHONE_FULL)
|
||||
(user.emailContact?.gmsPublishPhone === GmsPublishPhoneType.GMS_PUBLISH_PHONE_COUNTRY ||
|
||||
user.emailContact?.gmsPublishPhone === GmsPublishPhoneType.GMS_PUBLISH_PHONE_FULL)
|
||||
) {
|
||||
return user.emailContact.countryCode
|
||||
return user.emailContact?.countryCode
|
||||
}
|
||||
}
|
||||
|
||||
private getGmsPhone(user: dbUser): string | undefined {
|
||||
if (
|
||||
user.gmsAllowed &&
|
||||
user.emailContact.gmsPublishPhone === GmsPublishPhoneType.GMS_PUBLISH_PHONE_FULL
|
||||
user.emailContact?.gmsPublishPhone === GmsPublishPhoneType.GMS_PUBLISH_PHONE_FULL
|
||||
) {
|
||||
return user.emailContact.phone
|
||||
return user.emailContact?.phone
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user