diff --git a/polyfill.js b/polyfill.js index 3ca8923..5d31048 100644 --- a/polyfill.js +++ b/polyfill.js @@ -6,6 +6,7 @@ const ac = require("./dist/abort-controller") /*eslint-disable @mysticatea/prettier */ const g = typeof self !== "undefined" ? self : + typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : /* otherwise */ undefined diff --git a/polyfill.mjs b/polyfill.mjs index 0602a64..2a1a9d2 100644 --- a/polyfill.mjs +++ b/polyfill.mjs @@ -4,6 +4,7 @@ import * as ac from "./dist/abort-controller" /*eslint-disable @mysticatea/prettier */ const g = typeof self !== "undefined" ? self : + typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : /* otherwise */ undefined