diff --git a/dist/server.js b/dist/server.js index 487d8c3..cdc3494 100644 --- a/dist/server.js +++ b/dist/server.js @@ -44,7 +44,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) { const dom = new JSDOM(page); [...dom.window.document.querySelectorAll("script")].forEach((script2) => { if (script2.src.startsWith("/etc.clientlibs")) { - for (const clientlib in clientlibs) { + for (const clientlib of clientlibs) { if (script2.src.includes(clientlib)) { script2.remove(); } @@ -54,7 +54,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) { }); [...dom.window.document.querySelectorAll("link")].forEach((link) => { if (link.href.startsWith("/etc.clientlibs")) { - for (const clientlib in clientlibs) { + for (const clientlib of clientlibs) { if (link.href.includes(clientlib)) { link.remove(); } diff --git a/server.js b/server.js index 2fab221..2d7dd01 100644 --- a/server.js +++ b/server.js @@ -27,7 +27,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) { const dom = new JSDOM(page); [...dom.window.document.querySelectorAll('script')].forEach((script) => { if (script.src.startsWith('/etc.clientlibs')) { - for (const clientlib in clientlibs) { + for (const clientlib of clientlibs) { if (script.src.includes(clientlib)) { script.remove(); } @@ -38,7 +38,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) { [...dom.window.document.querySelectorAll('link')].forEach((link) => { if (link.href.startsWith('/etc.clientlibs')) { - for (const clientlib in clientlibs) { + for (const clientlib of clientlibs) { if (link.href.includes(clientlib)) { link.remove(); }