From df287e7122c756856987b6a8612d83978758c736 Mon Sep 17 00:00:00 2001 From: HEXIANG <869411657@qq.com> Date: Tue, 18 Jul 2023 12:55:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E8=BE=B9=E6=A0=8F?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E6=BB=9A=E5=8A=A8=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/site/zh/help.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/site/zh/help.html b/public/site/zh/help.html index fd3daf35e..28d76300a 100644 --- a/public/site/zh/help.html +++ b/public/site/zh/help.html @@ -804,12 +804,12 @@ function scrollHandler(){ // 遍历导航链接元素 allDataIds.map(item=>{ let elements = document.querySelectorAll("[data-id='" + item + "']"); - elements[0].classList.remove("active"); + elements[0]?.classList?.remove("active"); }) for (let i = 0; i < arrOffsetTop.length; i++) { if (arrOffsetTop[i] > window.scrollY){ let elementsWithDataId = document.querySelectorAll("[data-id='" + `section-${i}` + "']"); - elementsWithDataId[0].classList.add("active"); + elementsWithDataId[0]?.classList?.add("active"); return; } }