Skip to content

Commit

Permalink
Fix length properties on array methods (#1983)
Browse files Browse the repository at this point in the history
This Pull Request fixes length properties on multiple array prototype methods that were including rest parameters in the count. More tests should pass.

It changes the following:

- Length properties on some array prototype methods
  • Loading branch information
lupd authored and Razican committed Jun 8, 2022
1 parent e70b50b commit 5ac77ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions boa_engine/src/builtins/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ impl BuiltIn for Array {
.method(Self::flat, "flat", 0)
.method(Self::flat_map, "flatMap", 1)
.method(Self::slice, "slice", 2)
.method(Self::some, "some", 2)
.method(Self::some, "some", 1)
.method(Self::sort, "sort", 1)
.method(Self::splice, "splice", 3)
.method(Self::reduce, "reduce", 2)
.method(Self::reduce_right, "reduceRight", 2)
.method(Self::splice, "splice", 2)
.method(Self::reduce, "reduce", 1)
.method(Self::reduce_right, "reduceRight", 1)
.method(Self::keys, "keys", 0)
.method(Self::entries, "entries", 0)
.method(Self::copy_within, "copyWithin", 3)
.method(Self::copy_within, "copyWithin", 2)
// Static Methods
.static_method(Self::from, "from", 1)
.static_method(Self::is_array, "isArray", 1)
Expand Down

0 comments on commit 5ac77ed

Please sign in to comment.