errors: refactor to use more primordials

PR-URL: https://github.com/nodejs/node/pull/36651
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yash Ladha <yash@yashladha.in>
This commit is contained in:
Antoine du Hamel authored and Michaël Zasso committed 2021-06-11 09:29:54 +02:00
1 parent 1dc4dea215
commit dcd221ce69
1 file changed
+2 -1
+2 -1
View File
@@ -26,6 +26,7 @@ const {
ErrorCaptureStackTrace,
ErrorPrototypeToString,
JSONStringify,
MapPrototypeGet,
MathAbs,
MathMax,
Number,
@@ -406,7 +407,7 @@ function uvErrmapGet(name) {
if (!uvBinding.errmap) {
uvBinding.errmap = uvBinding.getErrorMap();
}
return uvBinding.errmap.get(name);
return MapPrototypeGet(uvBinding.errmap, name);
}