From 93556bb88b866371875ff4a588c25cd2f7638579 Mon Sep 17 00:00:00 2001 From: Jack Kavanagh Date: Wed, 4 Jun 2025 10:36:38 +0200 Subject: [PATCH] patch out range global (#8771) * patch out range global * cycler --- packages/insomnia/src/templating/index.ts | 2 ++ packages/insomnia/src/templating/worker.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/insomnia/src/templating/index.ts b/packages/insomnia/src/templating/index.ts index 0691b695c0..d17dbca01d 100644 --- a/packages/insomnia/src/templating/index.ts +++ b/packages/insomnia/src/templating/index.ts @@ -170,6 +170,8 @@ async function getNunjucks(renderMode: string, ignoreUndefinedEnvVariable?: bool // Create Env with Extensions // // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // const nunjucksEnvironment = nunjucks.configure(config) as NunjucksEnvironment; + nunjucksEnvironment.addGlobal('range', undefined); + nunjucksEnvironment.addGlobal('cycler', undefined); const pluginTemplateTags = await (await import('../plugins')).getTemplateTags(); const allExtensions = [ diff --git a/packages/insomnia/src/templating/worker.ts b/packages/insomnia/src/templating/worker.ts index 24364c3957..52dbef783b 100644 --- a/packages/insomnia/src/templating/worker.ts +++ b/packages/insomnia/src/templating/worker.ts @@ -170,7 +170,8 @@ async function getNunjucks(renderMode: string, ignoreUndefinedEnvVariable?: bool // Create Env with Extensions // // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // const nunjucksEnvironment = nunjucks.configure(config) as NunjucksEnvironment; - + nunjucksEnvironment.addGlobal('range', undefined); + nunjucksEnvironment.addGlobal('cycler', undefined); const allExtensions = [...localTemplateTags]; for (const extension of allExtensions) {