diff --git a/app/components/HotjarLoader.tsx b/app/components/HotjarLoader.tsx index c55f6ffe1..cc78c3a1a 100644 --- a/app/components/HotjarLoader.tsx +++ b/app/components/HotjarLoader.tsx @@ -13,8 +13,8 @@ export default function HotjarLoader() { h._hjSettings = { hjid: 3414362, hjsv: 6 }; // 获取 元素 - a = o.getElementsByTagName("head")[0]; - if (!a) { + const headElement = o.getElementsByTagName("head")[0]; + if (!headElement) { console.error("Head element not found in the document."); return; // 如果没有找到 ,直接退出 } @@ -25,7 +25,7 @@ export default function HotjarLoader() { r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv; // 将