We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 257c5b6 commit 032df4eCopy full SHA for 032df4e
doc/api/util.md
@@ -67,7 +67,7 @@ const callbackFunction = util.callbackify(fn);
67
callbackFunction((err, ret) => {
68
// When the Promise was rejected with `null` it is wrapped with an Error and
69
// the original value is stored in `reason`.
70
- err && err.hasOwnProperty('reason') && err.reason === null; // true
+ err && Object.hasOwn(err, 'reason') && err.reason === null; // true
71
});
72
```
73
0 commit comments