mirror of
https://github.com/whyour/qinglong.git
synced 2025-11-08 15:06:08 +08:00
Add type annotation and logging to catch block per code review
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
73822d6361
commit
1f1dc84483
|
|
@ -14,8 +14,9 @@ export function rootContainer(container: any) {
|
|||
cookieLocaleKey: 'lang',
|
||||
localStorageLocaleKey: 'lang',
|
||||
}).slice(0, 2);
|
||||
} catch (e) {
|
||||
} catch (e: unknown) {
|
||||
// Handle decodeURIComponent errors from malformed cookies
|
||||
console.warn('Failed to determine locale from cookies:', e);
|
||||
currentLocale = '';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user