Skip to content

Commit 474e67e

Browse files
committed
use enabledHooksExist in task_queues
1 parent e51b8c3 commit 474e67e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/process/task_queues.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const {
2525

2626
const {
2727
getDefaultTriggerAsyncId,
28-
getHookArrays,
28+
enabledHooksExist,
2929
newAsyncId,
3030
initHooksExist,
3131
emitInit,
@@ -160,7 +160,7 @@ function queueMicrotask(callback) {
160160
validateFunction(callback, 'callback');
161161

162162
const contextFrame = AsyncContextFrame.current();
163-
if (contextFrame || getHookArrays()[0].length > 0) {
163+
if (contextFrame || enabledHooksExist()) {
164164
const asyncResource = new AsyncResource(
165165
'Microtask',
166166
defaultMicrotaskResourceOpts,

0 commit comments

Comments
 (0)