patch out range global (#8771)

* patch out range global

* cycler
This commit is contained in:
Jack Kavanagh
2025-06-04 10:36:38 +02:00
committed by GitHub
parent 152a113a3d
commit 93556bb88b
2 changed files with 4 additions and 1 deletions

View File

@@ -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 = [

View File

@@ -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) {