Skip to content

Commit

Permalink
Fixing a missing defensive check for an absent window global variable…
Browse files Browse the repository at this point in the history
… that was breaking service worker environments
  • Loading branch information
rory-instil committed Jul 18, 2023
1 parent 97e4535 commit 9e64a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/html-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9e64a83

Please sign in to comment.