From 43b61fdb394c987def5b9ccb2186d71ab5c4e57e Mon Sep 17 00:00:00 2001 From: Alex Eftimie Date: Thu, 3 Aug 2023 10:44:37 +0300 Subject: [PATCH] fix tsc Signed-off-by: Alex Eftimie --- .../src/scaffolder/tasks/NunjucksWorkflowRunner.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts index b0b8fd6d09..1f93ded94c 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts @@ -316,7 +316,9 @@ export class NunjucksWorkflowRunner implements WorkflowRunner { if (step.each) { const each = await this.render(step.each, context, renderTemplate); iterations.push( - ...Object.keys(each).map((key: any) => [key, each[key]]), + ...Object.keys(each).map((key: any) => { + return { key: key, value: each[key] }; + }), ); } else { iterations.push({}); @@ -328,7 +330,7 @@ export class NunjucksWorkflowRunner implements WorkflowRunner { taskLogger.info(`Running step each: ${iteration}`); const iterationContext = { ...context, - each: { key: iteration[0], value: iteration[1] }, + each: iteration, }; // re-render input with the modified context that includes each actionInput =