Skip to content

Commit dce115e

Browse files
committed
fix: uvBinding.errmap is undefined in Nodejs v12+
No idea why this did not fail in test/lib/binding.spec.js, a log of uvBinding.errmap did yield the error map (maybe mocha patched it??). It's very hard runtime error when using mock-fs 5.0.0-beta.1
1 parent c97e06f commit dce115e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const uvBinding = process.binding('uv');
77
*/
88
const codes = {};
99

10-
uvBinding.errmap.forEach(function(value, errno) {
10+
uvBinding.getErrorMap().forEach(function(value, errno) {
1111
const code = value[0];
1212
const message = value[1];
1313
codes[code] = {errno: errno, message: message};

0 commit comments

Comments
 (0)