Skip to content

Commit 1e2472e

Browse files
committed
fix: 修复默认语言问题
1 parent cf63c39 commit 1e2472e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/locales/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export const setLang = (_lang) => {
3232
export const initLang = async (currentUrl) => {
3333
if (isInit) return;
3434

35-
const isCnHref = currentUrl.includes(LEETCODE_CN_URL);
36-
setLang(isCnHref ? "zh" : "en");
35+
const isEnHref = currentUrl.includes(LEETCODE_URL);
36+
setLang(isEnHref ? "en":"zh");
3737
isInit = true;
3838
};
3939

0 commit comments

Comments
 (0)