Skip to content

Commit

Permalink
Merge pull request #3093 from qixing-jk/fix-hash
Browse files Browse the repository at this point in the history
feat(修复 hash 跳转):
  • Loading branch information
tangly1024 authored Jan 1, 2025
2 parents c80d645 + 7d0df4f commit dbcdc7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/NotionPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit dbcdc7e

Please sign in to comment.