mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
LibJS: Convert to_bigint() to ThrowCompletionOr
This commit is contained in:
parent
b8f101888b
commit
e87cea8248
10 changed files with 27 additions and 56 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue