Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f77692 commit 14ea8fcCopy full SHA for 14ea8fc
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