Skip to content

Commit 80316b9

Browse files
authored
Fix ToC nav (#536)
1 parent eae9f12 commit 80316b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elastic.Markdown/Assets/toc-nav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function setupSmoothScrolling(elements: TocElements) {
116116
const href = link.getAttribute('href');
117117
if (href?.charAt(0) === '#') {
118118
e.preventDefault();
119-
const target = $(href.replace('.', '\\.'));
119+
const target = document.getElementById(href.slice(1));
120120
if (target) {
121121
target.scrollIntoView({ behavior: 'smooth' });
122122
history.pushState(null, '', href);

0 commit comments

Comments
 (0)