Skip to content

Commit

Permalink
fixed bug not loading other scrips/css files
Browse files Browse the repository at this point in the history
  • Loading branch information
Helge Ahrens authored and Helge Ahrens committed Apr 11, 2022
1 parent 6b57439 commit ae6baf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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();
}
Expand Down

0 comments on commit ae6baf7

Please sign in to comment.