From c4e0bea93137d6cb21fa4fae90f3167ced50c06a Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 19 Aug 2024 18:19:38 +0100 Subject: [PATCH] don't return early -- should fix #626 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have no clue why I wrote that code 😭 --- packages/backend/src/core/AbuseReportService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/AbuseReportService.ts b/packages/backend/src/core/AbuseReportService.ts index 05f11870a1..007c3f1bf9 100644 --- a/packages/backend/src/core/AbuseReportService.ts +++ b/packages/backend/src/core/AbuseReportService.ts @@ -98,9 +98,9 @@ export class AbuseReportService { const shouldForward = paramsMap.get(report.id)!.forward; if (shouldForward && report.targetUserHost != null) { - return targetUserMap.set(report.id, await this.usersRepository.findOneByOrFail({ id: report.targetUserId })); + targetUserMap.set(report.id, await this.usersRepository.findOneByOrFail({ id: report.targetUserId })); } else { - return targetUserMap.set(report.id, null); + targetUserMap.set(report.id, null); } }