From 8aada931b5119cd9f6f287f86b8635fa51a97f4d Mon Sep 17 00:00:00 2001 From: Tiago Yamamoto Date: Tue, 23 Dec 2025 18:44:09 -0300 Subject: [PATCH] fix(frontend): remove any type from i18n key traversal --- frontend/src/lib/i18n.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/i18n.tsx b/frontend/src/lib/i18n.tsx index c4a816f..f80a6da 100644 --- a/frontend/src/lib/i18n.tsx +++ b/frontend/src/lib/i18n.tsx @@ -43,11 +43,11 @@ export function I18nProvider({ children }: { children: ReactNode }) { const t = useCallback((key: string, params?: Record): string => { const keys = key.split('.'); - let value: any = dictionaries[locale]; + let value: unknown = dictionaries[locale]; for (const k of keys) { - if (value && typeof value === 'object' && k in value) { - value = value[k]; + if (value && typeof value === 'object' && value !== null && k in value) { + value = (value as Record)[k]; } else { return key; // Return key if not found }