From 0e856ccfab98fc2f9c105efca91b09adef6c3da0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 29 Nov 2017 08:48:11 -0600 Subject: Fix phantom `Contracts` section issue --- packages/website/ts/pages/documentation/docs_info.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages') diff --git a/packages/website/ts/pages/documentation/docs_info.ts b/packages/website/ts/pages/documentation/docs_info.ts index fd8e9df74..7fe5d9b31 100644 --- a/packages/website/ts/pages/documentation/docs_info.ts +++ b/packages/website/ts/pages/documentation/docs_info.ts @@ -47,6 +47,11 @@ export class DocsInfo { } const finalMenu = _.cloneDeep(this.docsInfo.menu); + if (_.isUndefined(finalMenu.contracts)) { + return finalMenu; + } + + // TODO: refactor to include more sections then simply the `contracts` section finalMenu.contracts = _.filter(finalMenu.contracts, (contractName: string) => { const versionIntroducedIfExists = this.docsInfo.menuSubsectionToVersionWhenIntroduced[contractName]; if (!_.isUndefined(versionIntroducedIfExists)) { -- cgit v1.2.3