File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
apps/meteor/server/configuration Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export async function configureAccounts(): Promise<void> {
3434 if ( serviceName === 'meteor-developer' ) {
3535 if ( Array . isArray ( serviceData . emails ) ) {
3636 const primaryEmail = serviceData . emails . sort ( ( a ) => ( a . primary === true ? - 1 : 1 ) ) . filter ( ( item ) => item . verified === true ) [ 0 ] ;
37- serviceData . email = primaryEmail && primaryEmail . address ;
37+ serviceData . email = primaryEmail ? .address ;
3838 }
3939 }
4040
@@ -44,7 +44,7 @@ export async function configureAccounts(): Promise<void> {
4444
4545 if ( serviceData . email ) {
4646 const user = await Users . findOneByEmailAddress ( serviceData . email ) ;
47- if ( user != null && ( user . services as any ) ?. [ serviceName ] ?. id !== serviceData . id ) {
47+ if ( ! ! user && user . services ?. [ serviceName as keyof typeof user . services ] ?. id !== serviceData . id ) {
4848 const findQuery = {
4949 address : serviceData . email ,
5050 verified : true ,
You can’t perform that action at this time.
0 commit comments