Selaa lähdekoodia

bug fix for scroll into view for rendered markdown documents

Zuoyuan Huang 6 vuotta sitten
vanhempi
commit
a9dd3f9421
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      packages/toc/src/generators/markdowndocgenerator/index.ts

+ 1 - 3
packages/toc/src/generators/markdowndocgenerator/index.ts

@@ -215,9 +215,7 @@ namespace Private {
       let html = sanitizer.sanitize(heading.innerHTML, sanitizerOptions);
       html = html.replace('¶', ''); // Remove the anchor symbol.
       const onClick = () => {
-        return () => {
-          heading.scrollIntoView();
-        };
+        heading.scrollIntoView();
       };
 
       // Get the numbering string