mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:07:35 +00:00
LibJS: Add missing assert to TypedArray.prototype.includes
This commit is contained in:
parent
34f27f76ec
commit
f1b4412005
1 changed files with 3 additions and 1 deletions
|
@ -618,7 +618,9 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::includes)
|
||||||
// 5. Let n be ? ToIntegerOrInfinity(fromIndex).
|
// 5. Let n be ? ToIntegerOrInfinity(fromIndex).
|
||||||
auto n = TRY(vm.argument(1).to_integer_or_infinity(vm));
|
auto n = TRY(vm.argument(1).to_integer_or_infinity(vm));
|
||||||
|
|
||||||
// FIXME: 6. Assert: If fromIndex is undefined, then n is 0.
|
// 6. Assert: If fromIndex is undefined, then n is 0.
|
||||||
|
if (vm.argument(1).is_undefined())
|
||||||
|
VERIFY(n == 0);
|
||||||
|
|
||||||
auto value_n = Value(n);
|
auto value_n = Value(n);
|
||||||
// 7. If n is +∞, return false.
|
// 7. If n is +∞, return false.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue