fix(plugin-docs): not scroll to top when route change
MODIFY
packages/plugin-docs/src/compiler.ts
packages/plugin-docs/src/compiler.ts
@@ -46,6 +46,8 @@ function MDXContent(props = {}) {
if (window.location.hash.length !== 0) {
const hash = window.location.hash;
document.getElementById(hash.slice(1))?.scrollIntoView();
+ } else {
+ window.scrollTo(0, 0);
}
}, []);

fix(plugin-docs): not scroll to top when route change (#658)