From a1b8dcc30c2040895b3406842e7c574dd4ffd499 Mon Sep 17 00:00:00 2001 From: metal Date: Thu, 23 Sep 2021 12:02:22 +0100 Subject: [PATCH] Update backend/src/plugins/ModActions/functions/parseReason.ts Co-authored-by: Almeida --- backend/src/plugins/ModActions/functions/parseReason.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/plugins/ModActions/functions/parseReason.ts b/backend/src/plugins/ModActions/functions/parseReason.ts index 93c8ea8c..a73b0ff3 100644 --- a/backend/src/plugins/ModActions/functions/parseReason.ts +++ b/backend/src/plugins/ModActions/functions/parseReason.ts @@ -5,7 +5,7 @@ const MAX_REASON_LENGTH = 512; export function parseReason(config: TConfigSchema, reason: string): string { if (!reason) return reason; if (config?.reason_aliases) { - reason = config.reason_aliases![reason.toLowerCase()] ?? reason; + reason = config.reason_aliases[reason.toLowerCase()] ?? reason; } if (reason!.length > MAX_REASON_LENGTH) { reason = reason!.substring(0, MAX_REASON_LENGTH - 4) + " […]";