Skip to content

Commit 1895122

Browse files
committed
✅ 修复单元测试问题
1 parent 5c012a3 commit 1895122

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/chrome-extension-mock/i18n.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default class I18n {
44
}
55

66
getAcceptLanguages(callback: (lngs: string[]) => void) {
7-
// callback(["zh-CN"]);
7+
callback && callback(["zh-CN"]);
8+
return Promise.resolve(["zh-CN"]);
89
}
910
}

src/pages/components/layout/MainLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const MainLayout: React.FC<{
123123
});
124124

125125
useEffect(() => {
126-
// 当没有匹配语言且系统配置中没有设置语言时显示语言按钮
126+
// 当没有匹配语言时显示语言按钮
127127
matchLanguage().then((result) => {
128128
if (!result) {
129129
setShowLanguage(true);

0 commit comments

Comments
 (0)