From 060119673f5fe09eeb3a0edd8d128d92a27b3b5c Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 1 Jul 2016 18:10:13 +0300 Subject: [PATCH] Fix menutree building --- lib/services/schema-helper.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/schema-helper.service.ts b/lib/services/schema-helper.service.ts index 2fef12fe..c0445652 100644 --- a/lib/services/schema-helper.service.ts +++ b/lib/services/schema-helper.service.ts @@ -232,6 +232,7 @@ export class SchemaHelper { for (let tag of definedTags) { tag2MethodMapping[tag.name] = { 'description': tag.description, + 'name': tag.name, 'x-traitTag': tag['x-traitTag'], 'methods': [] }; @@ -244,7 +245,6 @@ export class SchemaHelper { let methodInfo = paths[path][method]; let tags = methodInfo.tags; - //TODO: mb need to do something cleverer if (!tags || !tags.length) { tags = ['']; } @@ -252,10 +252,10 @@ export class SchemaHelper { let methodSummary = SchemaHelper.methodSummary(methodInfo); for (let tag of tags) { let tagDetails = tag2MethodMapping[tag]; - if (!tagDetails) { + if (!tag2MethodMapping[tag]) { tagDetails = { name: tag, - empty: !tag + empty: tag === '' }; tag2MethodMapping[tag] = tagDetails; }