From c8ace2edc017969f405ffaa1293620850ed5fc05 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 6 Mar 2018 16:37:37 +0100 Subject: Remove location prop --- packages/react-docs/src/ts/components/documentation.tsx | 3 +-- packages/website/ts/pages/documentation/doc_page.tsx | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-docs/src/ts/components/documentation.tsx b/packages/react-docs/src/ts/components/documentation.tsx index 62632184c..f5a117797 100644 --- a/packages/react-docs/src/ts/components/documentation.tsx +++ b/packages/react-docs/src/ts/components/documentation.tsx @@ -47,7 +47,6 @@ const networkNameToColor: { [network: string]: string } = { }; export interface DocumentationProps { - location: Location; docsVersion: string; availableDocVersions: string[]; docsInfo: DocsInfo; @@ -80,7 +79,7 @@ const styles: Styles = { export class Documentation extends React.Component { public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) { if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) { - const hash = this.props.location.hash.slice(1); + const hash = window.location.hash.slice(1); sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); } } diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 9bf6b528e..98a6a6413 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -81,7 +81,6 @@ export class DocPage extends React.Component { translate={this.props.translate} />