diff options
Diffstat (limited to 'packages/website/ts')
-rw-r--r-- | packages/website/ts/pages/shared/markdown_link_block.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/website/ts/pages/shared/markdown_link_block.tsx b/packages/website/ts/pages/shared/markdown_link_block.tsx index a8246f654..45bb41478 100644 --- a/packages/website/ts/pages/shared/markdown_link_block.tsx +++ b/packages/website/ts/pages/shared/markdown_link_block.tsx @@ -38,7 +38,9 @@ export class MarkdownLinkBlock extends React.Component<MarkdownLinkBlockProps, M } } private _onHashUrlClick(href: string) { - const hashWithPrefix = `#${href.split('#')[1]}`; + const hash = href.split('#')[1]; + const hashWithPrefix = `#${hash}`; utils.scrollToHash(hashWithPrefix, configs.SCROLL_CONTAINER_ID); + utils.setUrlHash(hash); } } |