We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f8b647 commit fef58b3Copy full SHA for fef58b3
index.js
@@ -2,7 +2,7 @@
2
let promise
3
4
module.exports = typeof queueMicrotask === 'function'
5
- ? queueMicrotask.bind(globalThis)
+ ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)
6
// reuse resolved promise, and allocate it lazily
7
: cb => (promise || (promise = Promise.resolve()))
8
.then(cb)
0 commit comments