mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibJS: Convert the NumberToBigInt AO to ThrowCompletionOr
This commit is contained in:
parent
f7bafea661
commit
306c25f3c2
5 changed files with 8 additions and 16 deletions
|
@ -52,7 +52,7 @@ ThrowCompletionOr<Value> BigIntConstructor::call()
|
|||
|
||||
// 3. If Type(prim) is Number, return ? NumberToBigInt(prim).
|
||||
if (primitive.is_number())
|
||||
return number_to_bigint(global_object, primitive);
|
||||
return TRY(number_to_bigint(global_object, primitive));
|
||||
|
||||
// 4. Otherwise, return ? ToBigInt(value).
|
||||
return TRY(value.to_bigint(global_object));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue