From 99b757488c077cee7d0ab89eeec181a7ee6290eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 15 Nov 2022 15:00:19 +0100 Subject: Fix server lint --- shared/core-utils/i18n/i18n.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shared/core-utils/i18n') diff --git a/shared/core-utils/i18n/i18n.ts b/shared/core-utils/i18n/i18n.ts index abc7acc8b..b720fb84e 100644 --- a/shared/core-utils/i18n/i18n.ts +++ b/shared/core-utils/i18n/i18n.ts @@ -82,7 +82,7 @@ export function isDefaultLocale (locale: string) { } export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) { - if (!translations || !translations[str]) return str + if (!translations?.[str]) return str return translations[str] } -- cgit v1.2.3