diff options
| author | Lilly Schramm <privat@eps-dev.de> | 2025-06-18 20:25:32 +0200 |
|---|---|---|
| committer | Lilly Schramm <privat@eps-dev.de> | 2025-06-18 20:25:32 +0200 |
| commit | 372e141bcf133708c23368043d3fdda26f8890da (patch) | |
| tree | ac681f1e521ebf88ca6ba5e7049861857714465e /packages/backend/src/core | |
| parent | fix(backend): Send Abuse Reports To Set Maintainer E-Mail (diff) | |
| download | sharkey-372e141bcf133708c23368043d3fdda26f8890da.tar.gz sharkey-372e141bcf133708c23368043d3fdda26f8890da.tar.bz2 sharkey-372e141bcf133708c23368043d3fdda26f8890da.zip | |
refactor(backend): Resolve Nested Conditionals
Diffstat (limited to 'packages/backend/src/core')
| -rw-r--r-- | packages/backend/src/core/AbuseReportNotificationService.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/backend/src/core/AbuseReportNotificationService.ts b/packages/backend/src/core/AbuseReportNotificationService.ts index a67e5e19a7..307f22586e 100644 --- a/packages/backend/src/core/AbuseReportNotificationService.ts +++ b/packages/backend/src/core/AbuseReportNotificationService.ts @@ -93,10 +93,13 @@ export class AbuseReportNotificationService implements OnApplicationShutdown { .filter(x => x != null), ); - recipientEMailAddresses.push( - ...(this.meta.email ? [this.meta.email] : []), - ...(this.meta.maintainerEmail ? [this.meta.maintainerEmail] : []), - ); + if (this.meta.email) { + recipientEMailAddresses.push(this.meta.email); + } + + if (this.meta.maintainerEmail) { + recipientEMailAddresses.push(this.meta.maintainerEmail); + } return recipientEMailAddresses; } |