Skip to content

Commit

Permalink
Merge pull request #14286 from RocketChat/fix/emails-undefined
Browse files Browse the repository at this point in the history
[FIX] Startup error in registration check
  • Loading branch information
rodrigok committed Apr 29, 2019
1 parent a7a73d9 commit b26735c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/cloud/server/functions/retrieveRegistrationStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function retrieveRegistrationStatus() {
};

const firstUser = Users.getOldest({ emails: 1 });
info.email = firstUser && firstUser.emails[0].address;
info.email = firstUser && firstUser.emails && firstUser.emails[0].address;

if (settings.get('Organization_Email')) {
info.email = settings.get('Organization_Email');
Expand Down

0 comments on commit b26735c

Please sign in to comment.