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 | |
parent | 6093ee78241c42b66be95bf8bfff28d48bf41d45 (diff) | |
download | dexon-sol-tools-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar dexon-sol-tools-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar.gz dexon-sol-tools-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar.bz2 dexon-sol-tools-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar.lz dexon-sol-tools-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar.xz dexon-sol-tools-0e856ccfab98fc2f9c105efca91b09adef6c3da0.tar.zst dexon-sol-tools-0e856ccfab98fc2f9c105efca91b09adef6c3da0.zip |
Fix phantom `Contracts` section issue
Diffstat (limited to 'packages')
-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)) { |