From 4366a0d1223d493b6b286dca45e2bf03893ea29c Mon Sep 17 00:00:00 2001 From: Anton Komarev <1849174+antonkomarev@users.noreply.github.com> Date: Wed, 27 Mar 2019 12:19:24 +0500 Subject: [PATCH] fix: ignore empty x-tagGroups array (#869) --- src/services/MenuBuilder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/MenuBuilder.ts b/src/services/MenuBuilder.ts index 6dab0cb8..78876102 100644 --- a/src/services/MenuBuilder.ts +++ b/src/services/MenuBuilder.ts @@ -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), );