Merge pull request #3093 from qixing-jk/fix-hash

feat(修复 hash 跳转):
This commit is contained in:
tangly1024
2025-01-01 15:39:28 +08:00
committed by GitHub

View File

@@ -166,7 +166,7 @@ const autoScrollToHash = () => {
setTimeout(() => {
// 跳转到指定标题
const hash = window?.location?.hash
const needToJumpToTitle = hash && hash > 0
const needToJumpToTitle = hash && hash.length > 0
if (needToJumpToTitle) {
console.log('jump to hash', hash)
const tocNode = document.getElementById(hash.substring(1))