Remove location prop

This commit is contained in:
Fabio Berger
2018-03-06 16:37:37 +01:00
parent 0b1ba9f997
commit c8ace2edc0
2 changed files with 1 additions and 3 deletions

View File

@@ -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<DocumentationProps, DocumentationState> {
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);
}
}