ソースを参照

bug fix for scroll into view for rendered markdown documents

Zuoyuan Huang 6 年 前
コミット
a9dd3f9421
1 ファイル変更1 行追加3 行削除
  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