From 11f3387d732f6be4a20d248713f3874b3758e90f Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Mon, 1 Sep 2025 01:38:32 +0200 Subject: [PATCH] maint(pat-inject): Change one more forEach to a for loop. --- src/pat/inject/inject.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pat/inject/inject.js b/src/pat/inject/inject.js index e396c4c12..5081397a4 100644 --- a/src/pat/inject/inject.js +++ b/src/pat/inject/inject.js @@ -595,7 +595,8 @@ const inject = { ) { $title = sources$[sources$.length - 1]; } - cfgs.forEach((cfg, idx1) => { + + for (const [idx1, cfg] of cfgs.entries()) { const perform_inject = () => { if (cfg.target !== "none") { for (const target of cfg.$target) { @@ -615,7 +616,7 @@ const inject = { } else { perform_inject(); } - }); + } if (cfgs[0].nextHref && $el.is("a")) { // In case next-href is specified the anchor's href will // be set to it after the injection is triggered.