We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccf6eef commit ad65c19Copy full SHA for ad65c19
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