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 }