summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-10-16 21:52:16 +0300
committerLinus Groh <mail@linusgroh.de>2021-10-17 12:12:35 +0100
commite87cea8248115dd035ee91f56c1853d2391b84c0 (patch)
treedf438fcd2eca3b92600c9b9f242943b94b8fe978 /Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
parentb8f101888bf5cc16f7074266bf16ebde4744f452 (diff)
downloadserenity-e87cea8248115dd035ee91f56c1853d2391b84c0.zip
LibJS: Convert to_bigint() to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
index 44ae17c1b1..1fc8c1a215 100644
--- a/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/BigIntConstructor.cpp
@@ -55,7 +55,7 @@ Value BigIntConstructor::call()
return number_to_bigint(global_object, primitive);
// 4. Otherwise, return ? ToBigInt(value).
- return value.to_bigint(global_object);
+ return TRY_OR_DISCARD(value.to_bigint(global_object));
}
// 21.2.1.1 BigInt ( value ), https://tc39.es/ecma262/#sec-bigint-constructor-number-value