We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e51b8c3 commit 474e67eCopy full SHA for 474e67e
lib/internal/process/task_queues.js
@@ -25,7 +25,7 @@ const {
25
26
const {
27
getDefaultTriggerAsyncId,
28
- getHookArrays,
+ enabledHooksExist,
29
newAsyncId,
30
initHooksExist,
31
emitInit,
@@ -160,7 +160,7 @@ function queueMicrotask(callback) {
160
validateFunction(callback, 'callback');
161
162
const contextFrame = AsyncContextFrame.current();
163
- if (contextFrame || getHookArrays()[0].length > 0) {
+ if (contextFrame || enabledHooksExist()) {
164
const asyncResource = new AsyncResource(
165
'Microtask',
166
defaultMicrotaskResourceOpts,
0 commit comments