Skip to content

Commit 89198e4

Browse files
authored
Merge pull request #929 from InseeFrLab/fix-928
fix: array enumeration title starts at index 1
2 parents 162c26e + c9a04bd commit 89198e4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

web/src/core/usecases/launcher/decoupledLogic/computeRootForm/computeRootFormFieldGroup.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
319319
{
320320
type: "group",
321321
helmValuesPath: ["b", 0],
322-
title: "b 0",
322+
title: "b 1",
323323
description: undefined,
324324
nodes: [
325325
{

web/src/core/usecases/launcher/decoupledLogic/computeRootForm/computeRootFormFieldGroup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ function computeRootFormFieldGroup_rec(params: {
156156
const secondToLastSegment = helmValuesPath[helmValuesPath.length - 2];
157157

158158
if (secondToLastSegment === undefined) {
159-
return `item ${lastSegment}`;
159+
return `item ${lastSegment + 1}`;
160160
}
161161

162-
return `${secondToLastSegment} ${lastSegment}`;
162+
return `${secondToLastSegment} ${lastSegment + 1}`;
163163
})();
164164

165165
const isReadonly =

0 commit comments

Comments
 (0)