@contrail/document-generation
Advanced tools
Comparing version 2.0.25 to 2.0.26
@@ -26,2 +26,3 @@ "use strict"; | ||
static getLeafGroupsFromGroups(groups, totalDepth, currentDepth, groupName = null) { | ||
const currentGroupName = groupName; | ||
const leafGroups = []; | ||
@@ -34,3 +35,2 @@ for (let group of groups) { | ||
group.name = (!groupName) ? group.name : (groupName + ' / ' + group.name); | ||
; | ||
leafGroups.push(group); | ||
@@ -40,3 +40,3 @@ } | ||
if (currentDepth < totalDepth - 1) | ||
groupName = (!groupName) ? group.name : (groupName + ' / ' + group.name); | ||
groupName = (!currentGroupName) ? group.name : (currentGroupName + ' / ' + group.name); | ||
leafGroups.push(...this.getLeafGroupsFromGroups(group.subGroups, totalDepth, currentDepth + 1, groupName)); | ||
@@ -43,0 +43,0 @@ } |
{ | ||
"name": "@contrail/document-generation", | ||
"version": "2.0.25", | ||
"version": "2.0.26", | ||
"description": "Utilities for automatic generation of documents.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
793445