Skip to content

Commit

Permalink
simplify if
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Oct 2, 2024
1 parent 72bb7ab commit b44bf19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/src/core/server/stacks/approveComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ const approveComment = async (
}

// create notification if dsa enabled upon approval of previously rejected comment
if (tenant.dsa?.enabled) {
if (previousComment?.status === GQLCOMMENT_STATUS.REJECTED) {
if (tenant.dsa?.enabled && previousComment?.status === GQLCOMMENT_STATUS.REJECTED) {
await notifications.create(tenant.id, tenant.locale, {
targetUserID: result.after.authorID!,
comment: result.after,
Expand Down

0 comments on commit b44bf19

Please sign in to comment.