mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibJS: Convert the NumberToBigInt AO to ThrowCompletionOr
This commit is contained in:
parent
f7bafea661
commit
306c25f3c2
Notes:
sideshowbarker
2024-07-18 02:00:11 +09:00
Author: https://github.com/IdanHo
Commit: 306c25f3c2
Pull-request: https://github.com/SerenityOS/serenity/pull/10586
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