1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(ext/web): handle no arguments in atob (#13341)

This commit is contained in:
Luca Casonato 2022-01-11 17:31:13 +01:00 committed by crowlkats
parent 37a02bef69
commit 7c33e3e4d6
No known key found for this signature in database
GPG key ID: A82C9D461FC483E8

View file

@ -29,8 +29,10 @@
* @returns {string}
*/
function atob(data) {
const prefix = "Failed to execute 'atob'";
webidl.requiredArguments(arguments.length, 1, { prefix });
data = webidl.converters.DOMString(data, {
prefix: "Failed to execute 'atob'",
prefix,
context: "Argument 1",
});