We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e469ca6 commit e1e008dCopy full SHA for e1e008d
lib/domain.js
@@ -73,12 +73,14 @@ const asyncHook = createHook({
73
if (process.domain !== null && process.domain !== undefined) {
74
// If this operation is created while in a domain, let's mark it
75
pairing.set(asyncId, process.domain[kWeak]);
76
- ObjectDefineProperty(resource, 'domain', {
77
- configurable: true,
78
- enumerable: false,
79
- value: process.domain,
80
- writable: true
81
- });
+ if (type !== 'PROMISE' || resource instanceof Promise) {
+ ObjectDefineProperty(resource, 'domain', {
+ configurable: true,
+ enumerable: false,
+ value: process.domain,
+ writable: true
82
+ });
83
+ }
84
}
85
},
86
before(asyncId) {
0 commit comments