From 5b7dd552f87da80b343ba8ab6c4e3a7fdc82ec26 Mon Sep 17 00:00:00 2001 From: Joshua Rogers Date: Thu, 27 Mar 2025 02:36:26 +1100 Subject: [PATCH] Ensure that type of base64 is not a Number --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2e8e916..2e3a739 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,7 @@ function decodeBase64WithBufferFrom(base64) { } function decodeBase64WithNewBuffer(base64) { - if (typeof value === 'number') { + if (typeof base64 === 'number') { throw new TypeError('The value to decode must not be of type number.'); } return new Buffer(base64, 'base64').toString();