瀏覽代碼

define globalThis object if undefined (see #643)

Gildas 4 年之前
父節點
當前提交
f052143b8e
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js

+ 5 - 1
extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js

@@ -21,7 +21,11 @@
  *   Source.
  */
 
-/* global globalThis */
+/* global globalThis, window */
+
+if (typeof globalThis == "undefined") {
+	window.globalThis = window;
+}
 
 (() => {