fix(cli): fix anchor

This commit is contained in:
chenjiahan
2020-11-21 20:35:06 +08:00
parent 27c7d839c0
commit a13d43c802
4 changed files with 11 additions and 9 deletions

View File

@@ -2,7 +2,7 @@ export function scrollToAnchor(selector) {
let count = 0;
const timer = setInterval(() => {
const el = document.querySelector(selector);
const el = document.querySelector('#' + selector);
if (el) {
el.scrollIntoView();
clearInterval(timer);