Switch over remaining usage of sections.types for typeSectionName

This commit is contained in:
Fabio Berger
2018-09-27 23:32:29 +01:00
parent 092b184f45
commit 8531f52456

View File

@@ -84,11 +84,11 @@ export class DocsInfo {
return menuSubsectionsBySection;
}
public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } {
if (_.isUndefined(this.sections.types)) {
if (_.isUndefined(docAgnosticFormat[this.typeSectionName])) {
return {};
}
const section = docAgnosticFormat[this.sections.types];
const section = docAgnosticFormat[this.typeSectionName];
const typeDefinitionByName = _.keyBy(section.types, 'name') as any;
return typeDefinitionByName;
}