mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:47:35 +00:00
LibJS: Add missing assert to TypedArray.prototype.indexOf
This commit is contained in:
parent
80d2d3812a
commit
70a4e4bd67
1 changed files with 3 additions and 1 deletions
|
@ -681,7 +681,9 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::index_of)
|
|||
// 5. Let n be ? ToIntegerOrInfinity(fromIndex).
|
||||
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);
|
||||
// 7. If n is +∞, return -1𝔽.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue