Skip to main content
Sign in
Snippets Groups Projects
Commit 70b99271 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Repair trunk children.

parent d93ee100
No related branches found
No related tags found
No related merge requests found
......@@ -338,6 +338,8 @@ function buildVisibleDecompositions1(
childrenDepth = depth + 1
}
if (decomposition.open && visibleChildren !== undefined) {
let beforeChildrenVisibleDecompositionLength =
visibleDecompositions.length
let childValuesPreviousByCalculationName = valuesPreviousByCalculationName
for (const [childIndex, childReference] of visibleChildren.entries()) {
const childVisibleDecompositionIndex = buildVisibleDecompositions1(
......@@ -353,7 +355,9 @@ function buildVisibleDecompositions1(
vectorLength,
childrenDepth,
negate ? !childReference.negate : childReference.negate,
trunk && childIndex === 0 && visibleChildren.length > 1,
trunk &&
visibleDecompositions.length ===
beforeChildrenVisibleDecompositionLength,
childValuesPreviousByCalculationName,
visibleDecompositions,
year,
......@@ -373,7 +377,7 @@ function buildVisibleDecompositions1(
)
}
}
if (trunk && (!decomposition.open || decomposition.children.length > 1)) {
if (trunk) {
visibleDecompositionIndex = visibleDecompositions.length
visibleDecompositions.push(visibleDecomposition)
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment