@inseefr/lunatic 2.6.13 → 2.6.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,7 +42,7 @@ function getNextPager(pager, parent) {
|
|
|
42
42
|
|
|
43
43
|
// We reached the end of the sequence
|
|
44
44
|
var isEndSequence = subPage && pager.nbSubPages ? subPage >= pager.nbSubPages : false;
|
|
45
|
-
var moveUpOnEnd = parent === 'Roundabout' && pager.nbIterations
|
|
45
|
+
var moveUpOnEnd = parent === 'Roundabout' && pager.nbIterations;
|
|
46
46
|
// Move up at the end of a sequence (instead of going to the next Iteration)
|
|
47
47
|
if (isEndSequence && moveUpOnEnd) {
|
|
48
48
|
return _objectSpread(_objectSpread({}, pager), {}, {
|
|
@@ -37,14 +37,6 @@ function autoExploreLoop(state) {
|
|
|
37
37
|
goInsideSubpage(page.subPages, state.executeExpression(page.iterations));
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
// The page contains a roundabout, go to the first iteration if it only has one iteration
|
|
41
|
-
if (page.components[0].componentType === 'Roundabout' && page.subPages && page.subPages.length > 0) {
|
|
42
|
-
var nbIterations = state.executeExpression(page.iterations);
|
|
43
|
-
if (nbIterations === 1) {
|
|
44
|
-
goInsideSubpage(page.subPages, 1);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
40
|
// No loop were explored, don't mutate the state
|
|
49
41
|
if (!hasExploredLoop) {
|
|
50
42
|
return state;
|