Skip to content

Commit

Permalink
fix: show roundabout subsequences in overview (#1062)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grafikart authored Jul 16, 2024
1 parent 31158fa commit 594b72d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/use-lunatic/reducer/overview/overviewOnInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ function overviewFromComponent(
extra: Partial<LunaticOverviewItem> = {}
): LunaticOverviewItem[] {
// For loop we need to explore Subsequence inside the loop
if (component.componentType === 'Loop') {
if (
component.componentType === 'Loop' ||
component.componentType === 'Roundabout'
) {
return overviewFromLoop(items, component);
}

Expand Down Expand Up @@ -46,7 +49,7 @@ function overviewFromComponent(
*/
function overviewFromLoop(
items: LunaticOverviewItem[],
component: LunaticComponentDefinition<'Loop'>
component: LunaticComponentDefinition<'Loop' | 'Roundabout'>
): LunaticOverviewItem[] {
// Since we don't know how many iterations we have, skip this component
if (!('iterations' in component)) {
Expand Down

0 comments on commit 594b72d

Please sign in to comment.