perf: snap code (#3350)

* perf: readme

* perf: snap code
This commit is contained in:
Archer
2024-12-09 18:27:40 +08:00
committed by shilin66
parent 1a5a1ee515
commit 73ac0e77b8
5 changed files with 6 additions and 8 deletions

View File

@@ -32,9 +32,10 @@ export const useI18nLng = () => {
});
const currentLng = i18n?.language;
await i18n?.changeLanguage?.(lang);
if (!currentLng) return;
if (currentLng !== lang && currentLng) {
await i18n?.changeLanguage?.(lang);
if (currentLng !== lang) {
window?.location?.reload?.();
}
};