Skip to content

Commit ae6baf7

Browse files
Helge AhrensHelge Ahrens
Helge Ahrens
authored and
Helge Ahrens
committed
fixed bug not loading other scrips/css files
1 parent 6b57439 commit ae6baf7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) {
4444
const dom = new JSDOM(page);
4545
[...dom.window.document.querySelectorAll("script")].forEach((script2) => {
4646
if (script2.src.startsWith("/etc.clientlibs")) {
47-
for (const clientlib in clientlibs) {
47+
for (const clientlib of clientlibs) {
4848
if (script2.src.includes(clientlib)) {
4949
script2.remove();
5050
}
@@ -54,7 +54,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) {
5454
});
5555
[...dom.window.document.querySelectorAll("link")].forEach((link) => {
5656
if (link.href.startsWith("/etc.clientlibs")) {
57-
for (const clientlib in clientlibs) {
57+
for (const clientlib of clientlibs) {
5858
if (link.href.includes(clientlib)) {
5959
link.remove();
6060
}

server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) {
2727
const dom = new JSDOM(page);
2828
[...dom.window.document.querySelectorAll('script')].forEach((script) => {
2929
if (script.src.startsWith('/etc.clientlibs')) {
30-
for (const clientlib in clientlibs) {
30+
for (const clientlib of clientlibs) {
3131
if (script.src.includes(clientlib)) {
3232
script.remove();
3333
}
@@ -38,7 +38,7 @@ async function init(url, host, clientlibs, entry, headers, wcmmode) {
3838

3939
[...dom.window.document.querySelectorAll('link')].forEach((link) => {
4040
if (link.href.startsWith('/etc.clientlibs')) {
41-
for (const clientlib in clientlibs) {
41+
for (const clientlib of clientlibs) {
4242
if (link.href.includes(clientlib)) {
4343
link.remove();
4444
}

0 commit comments

Comments
 (0)