Sfoglia il codice sorgente

【修复】修复语言检测函数调用问题

将 detectLanguage() 函数调用改为常量赋值,确保返回值被正确捕获和使用。此修改解决了语言检测功能无法正常工作的问题,提高了代码的可读性和维护性。
PJ568 1 anno fa
parent
commit
638d0443f3
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      index.html

+ 1 - 1
index.html

@@ -448,7 +448,7 @@
 
         return isEnglish;
       }
-      detectLanguage();
+      const isEnglish = detectLanguage();
 
       // 获取页面元素
       const searchForm = document.getElementById("searchForm");