From c9d9bdfbd1d21d16c33bc6f62ed6b3e1528c83a1 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 8 Jan 2024 17:15:36 +0100 Subject: [PATCH] FIX: Remove all noscript elements, not just the first one (#25145) Regressed in 6c5522d --- app/assets/javascripts/discourse/app/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/app.js b/app/assets/javascripts/discourse/app/app.js index a8c419b5b6b..74a066dc6fd 100644 --- a/app/assets/javascripts/discourse/app/app.js +++ b/app/assets/javascripts/discourse/app/app.js @@ -30,7 +30,7 @@ const Discourse = Application.extend({ start() { printDebugInfo(); - document.querySelector("noscript")?.remove(); + document.querySelectorAll("noscript").forEach((el) => el.remove()); // Rewire event handling to eliminate event delegation for better compat // between Glimmer and Classic components.