diff --git a/components/NotionPage.js b/components/NotionPage.js index 4baf099c..eace0637 100644 --- a/components/NotionPage.js +++ b/components/NotionPage.js @@ -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))