diff --git a/lib/generate/Request/config.js b/lib/generate/Request/config.js index c627930..1c26a3a 100644 --- a/lib/generate/Request/config.js +++ b/lib/generate/Request/config.js @@ -182,8 +182,14 @@ ${aid.indent(pre.join('\n'))} function renderPost(post) { if (post.length) { + // TODO REMOVE FIX FOR UNSAFE OPTIONAL CHAINING CONVERSION - ORG CODE + // Linked to K6 issue: https://github.com/grafana/k6/issues/2168 + // return `post(response) { +// ${aid.indent(post.join('\n'))} +// }`; + // TODO REMOVE FIX FOR UNSAFE OPTIONAL CHAINING CONVERSION - FIX return `post(response) { -${aid.indent(post.join('\n'))} +${aid.indent(post.join('\n').replace(/\?\.\[/g, '[').replace(/\?\./g, '.'))} }`; } else { return null;