diff --git a/src/components/DocsMenu.js b/src/components/DocsMenu.js index bb075d74f6..29cf34b5e9 100644 --- a/src/components/DocsMenu.js +++ b/src/components/DocsMenu.js @@ -6,8 +6,9 @@ export default class DocsMenu extends React.Component { render() { let site = _.get(this.props, 'site', null); let page = _.get(this.props, 'page', null); - let root_docs_path = _.get(site, 'data.doc_sections.root_docs_path', null); - let root_page = getPage(this.props.pageContext.pages, root_docs_path); + let root_docs_path = _.get( site, 'data.doc_sections.root_docs_path', null ); + let pageContextProps = this.props.pageContext.pages; + let root_page = getPage(pageContextProps, root_docs_path); return (