1
Fork 0
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:
Jamie Mansfield 2022-11-19 12:16:21 +00:00 committed by Linus Groh
parent 34f27f76ec
commit f1b4412005

View file

@ -618,7 +618,9 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::includes)
// 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 false.