From e67c08b04fc3f197b1ddb805201d02c138ef12eb Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Wed, 2 May 2018 15:45:26 +0200 Subject: [PATCH] errors: remove dead code This was never falsy, since an array length can only be an integer. PR-URL: https://github.com/nodejs/node/pull/20483 Reviewed-By: James M Snell Reviewed-By: Khaidi Chu Reviewed-By: Trivikram Kamat Reviewed-By: Shingo Inoue --- lib/internal/errors.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index cc4c955cba1588..fc306e256c1f1a 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -870,7 +870,6 @@ E('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => { }, TypeError, RangeError); E('ERR_INVALID_ARRAY_LENGTH', (name, len, actual) => { - internalAssert(typeof actual === 'number', 'actual must be of type number'); return `The array "${name}" (length ${actual}) must be of length ${len}.`; }, TypeError); E('ERR_INVALID_ASYNC_ID', 'Invalid %s value: %s', RangeError);