From 3180435cd1218e28f27da6fc1ece0dbbb9faa46e Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 14 May 2024 21:01:53 +0200 Subject: [PATCH 1/2] Fix Legacy HTML page view `.children` is a HTMLCollection object which doesn't have a forEach interface. I confirmed this renders a few old style pages successfully. Fixes https://github.com/galaxyproject/galaxy/issues/18144 --- client/src/components/PageDisplay/PageHtml.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/PageDisplay/PageHtml.vue b/client/src/components/PageDisplay/PageHtml.vue index 2ee0fb20bd66..2110bb5a8909 100644 --- a/client/src/components/PageDisplay/PageHtml.vue +++ b/client/src/components/PageDisplay/PageHtml.vue @@ -32,7 +32,7 @@ export default { if (content) { const vDom = document.createElement("div"); vDom.innerHTML = content; - const children = vDom.children; + const children = Object.values(vDom.children); children.forEach((child) => { if (child.classList.contains("embedded-item")) { const splitId = child.id.split("-"); From 91f7bec6988f316b6db1f1b75b8ad661dd0b4ecc Mon Sep 17 00:00:00 2001 From: Marius van den Beek Date: Wed, 15 May 2024 08:42:50 +0200 Subject: [PATCH 2/2] Use Array.from instead of Object.values Co-authored-by: Dannon --- client/src/components/PageDisplay/PageHtml.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/PageDisplay/PageHtml.vue b/client/src/components/PageDisplay/PageHtml.vue index 2110bb5a8909..f7476e49b2ad 100644 --- a/client/src/components/PageDisplay/PageHtml.vue +++ b/client/src/components/PageDisplay/PageHtml.vue @@ -32,7 +32,7 @@ export default { if (content) { const vDom = document.createElement("div"); vDom.innerHTML = content; - const children = Object.values(vDom.children); + const children = Array.from(vDom.children); children.forEach((child) => { if (child.classList.contains("embedded-item")) { const splitId = child.id.split("-");