From dcd221ce69ef6cac2f995c86d8b81d4ed3713290 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 27 Dec 2020 19:31:58 +0100 Subject: [PATCH] errors: refactor to use more primordials PR-URL: https://github.com/nodejs/node/pull/36651 Reviewed-By: Rich Trott Reviewed-By: James M Snell Reviewed-By: Yash Ladha --- lib/internal/errors.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 3dddb38ce86ffe..31f569f5e57e6a 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -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); }