From f3ece7457a2f87787da1d77afdd4ccec7ba03574 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 11 Jan 2022 17:31:13 +0100 Subject: [PATCH] fix(ext/web): handle no arguments in atob (#13341) --- ext/web/05_base64.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/web/05_base64.js b/ext/web/05_base64.js index e0c2a36f8e..7f4b607c9b 100644 --- a/ext/web/05_base64.js +++ b/ext/web/05_base64.js @@ -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", });