Fix phantom Contracts section issue

This commit is contained in:
Fabio Berger
2017-11-29 08:48:11 -06:00
parent 6093ee7824
commit 0e856ccfab

View File

@@ -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)) {