From 6fabcb9c113dfc19e1defbffba5caec064596c8e Mon Sep 17 00:00:00 2001 From: ernscht Date: Thu, 21 Nov 2024 11:26:14 +0100 Subject: [PATCH] fix(app): viewlist helper fix --- packages/nitro-app/app/templating/twig/helpers/viewlist.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nitro-app/app/templating/twig/helpers/viewlist.js b/packages/nitro-app/app/templating/twig/helpers/viewlist.js index 0114e036..c07ed843 100644 --- a/packages/nitro-app/app/templating/twig/helpers/viewlist.js +++ b/packages/nitro-app/app/templating/twig/helpers/viewlist.js @@ -58,7 +58,7 @@ module.exports = function (Twig) { if (include !== '') { const includeArray = include.split(','); - filteredViews = views.filter((viewItem) => { + filteredViews = filteredViews.filter((viewItem) => { return includeArray.some((includeString) => { return viewItem.url.indexOf(includeString) >= 0; }); @@ -67,7 +67,7 @@ module.exports = function (Twig) { if (exclude !== '') { const excludeArray = exclude.split(','); - filteredViews = views.filter((viewItem) => { + filteredViews = filteredViews.filter((viewItem) => { return excludeArray.every((excludeString) => { return viewItem.url.indexOf(excludeString) === -1; });