From 2a3b84d38f60280144bdbcbc31101cd4d8867b74 Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Mon, 13 May 2024 22:54:38 +0200 Subject: [PATCH] fix(i18n/utils): typechecking errors Co-authored-by: ~hedy --- src/i18n/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/utils.ts b/src/i18n/utils.ts index 1eb25a7..a2cfbc5 100644 --- a/src/i18n/utils.ts +++ b/src/i18n/utils.ts @@ -13,7 +13,10 @@ export function useTranslations(lang: keyof typeof ui) { export function isOutdated(lang: keyof typeof ui) { if ("version" in ui[lang]) { - return ui[lang]["version"] < ui[defaultLang]["version"]; + return ( + (ui[lang] as (typeof ui)[typeof lang])["version"] < + ui[defaultLang]["version"] + ); } else { return true; }