Skip to content

Commit

Permalink
Merge pull request RocketChat#788 from Shailesh351/sb_sso_null_email
Browse files Browse the repository at this point in the history
Handle null email for SSO User on Profile Page
  • Loading branch information
ear-dev authored Jun 23, 2021
2 parents d03c833 + 5c5cd80 commit a53494b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/views/account/AccountProfileForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ function AccountProfileForm({ values, handlers, user, settings, onSaveStateChang
: t('Max_length_is', STATUS_TEXT_MAX_LENGTH),
[statusText, t],
);
const {
emails: [{ verified = false } = { verified: false }],
} = user;

const verified = (user.emails && user.emails.length && user.emails[0].verified) || false;

const canSave = !![
!!passwordError,
Expand Down

0 comments on commit a53494b

Please sign in to comment.