We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 561c268 commit 88e7386Copy full SHA for 88e7386
lib/internal/util.js
@@ -267,10 +267,9 @@ function promisify(original) {
267
if (typeof fn !== 'function') {
268
throw new ERR_INVALID_ARG_TYPE('util.promisify.custom', 'Function', fn);
269
}
270
- Object.defineProperty(fn, kCustomPromisifiedSymbol, {
+ return Object.defineProperty(fn, kCustomPromisifiedSymbol, {
271
value: fn, enumerable: false, writable: false, configurable: true
272
});
273
- return fn;
274
275
276
// Names to create an object from in case the callback receives multiple
0 commit comments