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();