We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b13f24c commit bca05f6Copy full SHA for bca05f6
lib/buffer.js
@@ -37,6 +37,7 @@ const {
37
ObjectDefineProperty,
38
ObjectPrototypeHasOwnProperty,
39
ObjectSetPrototypeOf,
40
+ RangeError,
41
RegExpPrototypeSymbolReplace,
42
StringPrototypeCharCodeAt,
43
StringPrototypeSlice,
@@ -1303,8 +1304,7 @@ function atob(input) {
1303
1304
'The string to be decoded is not correctly encoded.',
1305
'InvalidCharacterError');
1306
case -3: // Possible overflow
- // TODO(@anonrig): Throw correct error in here.
1307
- throw lazyDOMException('The input causes overflow.', 'InvalidCharacterError');
+ throw new RangeError('The string to be decoded is too long.');
1308
default:
1309
return result;
1310
}
0 commit comments