Ver código fonte

define globalThis object if undefined (see #643)

Gildas 4 anos atrás
pai
commit
cbe1300644

+ 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;