1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 16:19:12 -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 GitHub
parent 9f4e1e0d34
commit f3ece7457a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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",
});