summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
index 1d5e151df1..61e9b04e8e 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
@@ -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𝔽.