1
Fork 0
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:
Idan Horowitz 2021-10-23 03:26:55 +03:00 committed by Andreas Kling
parent f7bafea661
commit 306c25f3c2
5 changed files with 8 additions and 16 deletions

View file

@ -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));