Simplify conditions
This commit is contained in:
parent
c18a0378e9
commit
7799e77100
|
@ -147,8 +147,7 @@ export const sendOneWeekBonusEmail = async (
|
||||||
privateUser: PrivateUser
|
privateUser: PrivateUser
|
||||||
) => {
|
) => {
|
||||||
if (
|
if (
|
||||||
!privateUser ||
|
!privateUser?.email ||
|
||||||
!privateUser.email ||
|
|
||||||
privateUser.unsubscribedFromGenericEmails
|
privateUser.unsubscribedFromGenericEmails
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
@ -179,8 +178,7 @@ export const sendThankYouEmail = async (
|
||||||
privateUser: PrivateUser
|
privateUser: PrivateUser
|
||||||
) => {
|
) => {
|
||||||
if (
|
if (
|
||||||
!privateUser ||
|
!privateUser?.email ||
|
||||||
!privateUser.email ||
|
|
||||||
privateUser.unsubscribedFromGenericEmails
|
privateUser.unsubscribedFromGenericEmails
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
@ -253,8 +251,7 @@ export const sendNewCommentEmail = async (
|
||||||
) => {
|
) => {
|
||||||
const privateUser = await getPrivateUser(userId)
|
const privateUser = await getPrivateUser(userId)
|
||||||
if (
|
if (
|
||||||
!privateUser ||
|
!privateUser?.email ||
|
||||||
!privateUser.email ||
|
|
||||||
privateUser.unsubscribedFromCommentEmails
|
privateUser.unsubscribedFromCommentEmails
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
@ -333,8 +330,7 @@ export const sendNewAnswerEmail = async (
|
||||||
|
|
||||||
const privateUser = await getPrivateUser(userId)
|
const privateUser = await getPrivateUser(userId)
|
||||||
if (
|
if (
|
||||||
!privateUser ||
|
!privateUser?.email ||
|
||||||
!privateUser.email ||
|
|
||||||
privateUser.unsubscribedFromAnswerEmails
|
privateUser.unsubscribedFromAnswerEmails
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user