Fix email verification in sendSMTPTestEmail

Found by deepcode.ai.
This commit is contained in:
Marc Hartmayer committed 2020-05-24 13:19:24 +02:00
1 parent fc9f0d8392
commit 6e088af3d1
1 file changed
+1 -1
+1 -1
View File
@@ -259,7 +259,7 @@ if (Meteor.isServer) {
throw new Meteor.Error('invalid-user');
}
const user = Meteor.user();
if (!user.emails && !user.emails[0] && user.emails[0].address) {
if (!user.emails || !user.emails[0] || user.emails[0].address) {
throw new Meteor.Error('email-invalid');
}
this.unblock();