fix: ignore empty x-tagGroups array (#869)

This commit is contained in:
Anton Komarev 2019-03-27 12:19:24 +05:00 committed by Roman Hotsiy
parent 2f65f051e0
commit 4366a0d122

View File

@ -43,7 +43,7 @@ export class MenuBuilder {
const items: ContentItemModel[] = [];
const tagsMap = MenuBuilder.getTagsWithOperations(spec);
items.push(...MenuBuilder.addMarkdownItems(spec.info.description || '', options));
if (spec['x-tagGroups']) {
if (spec['x-tagGroups'] && spec['x-tagGroups'].length > 0) {
items.push(
...MenuBuilder.getTagGroupsItems(parser, undefined, spec['x-tagGroups'], tagsMap, options),
);