소스 검색

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