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 targos committed Jul 31, 2022
1 parent 2cdae43 commit a6a46f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/async_hooks.js
Original file line number Diff line number Diff line change
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 a6a46f9

Please sign in to comment.