1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

LibJS: Convert to_bigint() to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-10-16 21:52:16 +03:00 committed by Linus Groh
parent b8f101888b
commit e87cea8248
10 changed files with 27 additions and 56 deletions

View file

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