mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:37:44 +00:00
LibJS: Implement missing conditional when creating a TypedArray subarray
This commit is contained in:
parent
522302d5d6
commit
f1e01a681e
2 changed files with 19 additions and 1 deletions
|
@ -1846,7 +1846,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::subarray)
|
|||
MarkedVector<Value> arguments(vm.heap());
|
||||
|
||||
// 15. If O.[[ArrayLength]] is auto and end is undefined, then
|
||||
if (typed_array->array_length().is_auto()) {
|
||||
if (typed_array->array_length().is_auto() && end.is_undefined()) {
|
||||
// a. Let argumentsList be « buffer, 𝔽(beginByteOffset) ».
|
||||
arguments.empend(buffer);
|
||||
arguments.empend(begin_byte_offset.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue