summaryrefslogtreecommitdiff
path: root/ext/webidl
diff options
context:
space:
mode:
authorIan Bull <irbull@eclipsesource.com>2024-08-28 16:40:37 -0400
committerGitHub <noreply@github.com>2024-08-28 22:40:37 +0200
commit6ccaebcdeae95a82b270ac5bde78b65b37fadb45 (patch)
tree4c50dc3aa74ef6bef2aca4706af8b16213b1e1f2 /ext/webidl
parent231bdc0aa0c08914735001f5e1261e1808d68190 (diff)
refactor(ext): throw new error instead of throw error (#25272)
To ensure consistency across the codebase, this commit refactors the code in the `ext` folder to use `throw new Error`` instead of `throw` for throwing errors. Fixes https://github.com/denoland/deno/issues/25270
Diffstat (limited to 'ext/webidl')
-rw-r--r--ext/webidl/00_webidl.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js
index 9ea2200f3..36fc89ce2 100644
--- a/ext/webidl/00_webidl.js
+++ b/ext/webidl/00_webidl.js
@@ -95,7 +95,7 @@ function makeException(ErrorType, message, prefix, context) {
function toNumber(value) {
if (typeof value === "bigint") {
- throw TypeError("Cannot convert a BigInt value to a number");
+ throw new TypeError("Cannot convert a BigInt value to a number");
}
return Number(value);
}