Skip to content

Commit 7060fcc

Browse files
committed
fix: Section scroll error with weird name.
1 parent c3cdadc commit 7060fcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/event/scroll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export function scrollIntoView(path, id) {
147147
return;
148148
}
149149
const topMargin = config().topMargin;
150-
const section = dom.find('#' + id);
150+
const section = dom.find(`[id='${id}']`);
151151
section && scrollTo(section, topMargin);
152152

153153
const li = nav[getNavKey(path, id)];

0 commit comments

Comments
 (0)