Skip to content

Commit

Permalink
async_hooks: use kEmptyObject
Browse files Browse the repository at this point in the history
PR-URL: #43159
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
LiviaMedeiros authored and danielleadams committed Jun 13, 2022
1 parent b187d55 commit 702bfa0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/async_hooks.js
Expand Up @@ -20,6 +20,7 @@ const {
ERR_ASYNC_TYPE,
ERR_INVALID_ASYNC_ID
} = require('internal/errors').codes;
const { kEmptyObject } = require('internal/util');
const {
validateFunction,
validateString,
Expand Down Expand Up @@ -156,7 +157,7 @@ function createHook(fns) {
const destroyedSymbol = Symbol('destroyed');

class AsyncResource {
constructor(type, opts = {}) {
constructor(type, opts = kEmptyObject) {
validateString(type, 'type');

let triggerAsyncId = opts;
Expand Down

0 comments on commit 702bfa0

Please sign in to comment.