diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-29 22:48:11 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-29 22:48:11 +0800 |
commit | 0e856ccfab98fc2f9c105efca91b09adef6c3da0 (patch) | |
tree | 2d5001b04fbc94e1691b12a3c647265596b37b7b /packages/website/ts/pages | |
parent | 6093ee78241c42b66be95bf8bfff28d48bf41d45 (diff) | |
download | dexon-0x-contracts-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar.gz dexon-0x-contracts-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar.zst dexon-0x-contracts-0e856ccfab98fc2f9c105efca91b09adef6c3da0.zip |
Fix phantom `Contracts` section issue
Diffstat (limited to 'packages/website/ts/pages')
-rw-r--r-- | packages/website/ts/pages/documentation/docs_info.ts | 5 |
1 files changed, 5 insertions, 0 deletions
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)) { |