Explorar el Código

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

将 detectLanguage() 函数调用改为常量赋值,确保返回值被正确捕获和使用。此修改解决了语言检测功能无法正常工作的问题,提高了代码的可读性和维护性。
PJ568 hace 11 meses
padre
commit
638d0443f3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      index.html

+ 1 - 1
index.html

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