Bladeren bron

define globalThis object if undefined (see #643)

Gildas 4 jaren geleden
bovenliggende
commit
cbe1300644
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      lib/single-file/processors/hooks/content/content-hooks-frames.js

+ 3 - 0
lib/single-file/processors/hooks/content/content-hooks-frames.js

@@ -122,6 +122,9 @@ function loadDeferredImagesResetZoomLevel(options) {
 }
 
 function injectedScript() {
+	if (typeof globalThis == "undefined") {
+		window.globalThis = window;
+	}
 	const console = globalThis.console;
 	const dispatchEvent = event => globalThis.dispatchEvent(event);
 	const CustomEvent = globalThis.CustomEvent;