diff options
Diffstat (limited to 'packages/website/ts/pages')
-rw-r--r-- | packages/website/ts/pages/documentation/documentation.tsx | 3 | ||||
-rw-r--r-- | packages/website/ts/pages/shared/markdown_link_block.tsx | 3 | ||||
-rw-r--r-- | packages/website/ts/pages/wiki/wiki.tsx | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/packages/website/ts/pages/documentation/documentation.tsx b/packages/website/ts/pages/documentation/documentation.tsx index 5963fe851..699bef7a8 100644 --- a/packages/website/ts/pages/documentation/documentation.tsx +++ b/packages/website/ts/pages/documentation/documentation.tsx @@ -76,7 +76,8 @@ const styles: Styles = { export class Documentation extends React.Component<DocumentationProps, DocumentationState> { public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) { if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) { - utils.scrollToHash(this.props.location.hash, configs.SCROLL_CONTAINER_ID); + const hash = this.props.location.hash.slice(1); + utils.scrollToHash(hash, configs.SCROLL_CONTAINER_ID); } } public render() { diff --git a/packages/website/ts/pages/shared/markdown_link_block.tsx b/packages/website/ts/pages/shared/markdown_link_block.tsx index 45bb41478..ed78e4e53 100644 --- a/packages/website/ts/pages/shared/markdown_link_block.tsx +++ b/packages/website/ts/pages/shared/markdown_link_block.tsx @@ -39,8 +39,7 @@ export class MarkdownLinkBlock extends React.Component<MarkdownLinkBlockProps, M } private _onHashUrlClick(href: string) { const hash = href.split('#')[1]; - const hashWithPrefix = `#${hash}`; - utils.scrollToHash(hashWithPrefix, configs.SCROLL_CONTAINER_ID); + utils.scrollToHash(hash, configs.SCROLL_CONTAINER_ID); utils.setUrlHash(hash); } } diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 66fa960d7..4bb6052a2 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -213,7 +213,8 @@ export class Wiki extends React.Component<WikiProps, WikiState> { }, async () => { await utils.onPageLoadAsync(); - utils.scrollToHash(this.props.location.hash, configs.SCROLL_CONTAINER_ID); + const hash = this.props.location.hash.slice(1); + utils.scrollToHash(hash, configs.SCROLL_CONTAINER_ID); }, ); } |