| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ const { | |||
| 20 | 20 | ERR_ASYNC_TYPE, | |
| 21 | 21 | ERR_INVALID_ASYNC_ID | |
| 22 | 22 | } = require('internal/errors').codes; | |
| 23 | + const { kEmptyObject } = require('internal/util'); | ||
| 23 | 24 | const { | |
| 24 | 25 | validateFunction, | |
| 25 | 26 | validateString, | |
@@ -156,7 +157,7 @@ function createHook(fns) { | |||
| 156 | 157 | const destroyedSymbol = Symbol('destroyed'); | |
| 157 | 158 | ||
| 158 | 159 | class AsyncResource { | |
| 159 | - constructor(type, opts = {}) { | ||
| 160 | + constructor(type, opts = kEmptyObject) { | ||
| 160 | 161 | validateString(type, 'type'); | |
| 161 | 162 | ||
| 162 | 163 | let triggerAsyncId = opts; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments