fix: test & build error

This commit is contained in:
duanfuxiang
2025-06-12 16:20:08 +08:00
parent d16207e3c5
commit 896acd09e0
5 changed files with 18 additions and 14 deletions

View File

@@ -68,7 +68,7 @@ export function t(str: string, params?: Record<string, any>): any {
}
const path = str.split('.');
let result = locale || en;
let result: any = locale || en;
for (const key of path) {
result = result[key] || (en && en[key]);