From 9e64a8326ba1c6bec97cf3fbe7900c78b796c639 Mon Sep 17 00:00:00 2001 From: Rory Armstrong Date: Tue, 18 Jul 2023 16:52:33 +0100 Subject: [PATCH] Fixing a missing defensive check for an absent window global variable that was breaking service worker environments --- src/html-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html-parser.js b/src/html-parser.js index 2fa78e2f..de01586e 100644 --- a/src/html-parser.js +++ b/src/html-parser.js @@ -60,7 +60,7 @@ function shouldUseActiveX () { try { document.implementation.createHTMLDocument('').open() } catch (e) { - if (window.ActiveXObject) useActiveX = true + if (root.ActiveXObject) useActiveX = true } return useActiveX }