fix(i18n/utils): typechecking errors

Co-authored-by: ~hedy <hedyhyry@gmail.com>
This commit is contained in:
Florian Warzecha 2024-05-13 22:54:38 +02:00 committed by GitHub
parent fa47a923ed
commit 2a3b84d38f
Failed to generate hash of commit

View file

@ -13,7 +13,10 @@ export function useTranslations(lang: keyof typeof ui) {
export function isOutdated(lang: keyof typeof ui) { export function isOutdated(lang: keyof typeof ui) {
if ("version" in ui[lang]) { 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 { } else {
return true; return true;
} }