feat(修复 hash 跳转):

(cherry picked from commit 5769bfb2886775f5b3339a76d5d6a590b67d56b5)
This commit is contained in:
anime
2024-12-28 05:15:10 +08:00
parent b70c0f4ee7
commit 7d0df4f910

View File

@@ -150,7 +150,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))