Skip to content

Commit

Permalink
fix: dont attempt to send email to no users (#4352)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyjablonski authored Oct 1, 2024
1 parent 1876aef commit 09cdb35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/src/services/email.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export class EmailService {
attachment?: EmailAttachmentData,
) {
const isMultipleRecipients = Array.isArray(to);
if (isMultipleRecipients && to.length === 0) return;
const emailParams: MailDataRequired = {
to,
from,
Expand Down

0 comments on commit 09cdb35

Please sign in to comment.