Skip to content

Commit

Permalink
Merge pull request #408 from locks/patch-1
Browse files Browse the repository at this point in the history
Move Array#fill to "write then read" methods so the template correctly updates
  • Loading branch information
SergeAstapov authored Sep 22, 2023
2 parents 2a295d1 + 4c89ef3 commit 15c8ced
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon/src/-private/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const ARRAY_GETTER_METHODS = new Set<string | symbol | number>([
'concat',
'entries',
'every',
'fill',
'filter',
'find',
'findIndex',
Expand All @@ -41,6 +40,7 @@ const ARRAY_GETTER_METHODS = new Set<string | symbol | number>([
// For these methods, `Array` itself immediately gets the `.length` to return
// after invoking them.
const ARRAY_WRITE_THEN_READ_METHODS = new Set<string | symbol>([
'fill',
'push',
'unshift',
]);
Expand Down
2 changes: 1 addition & 1 deletion test-app/tests/unit/array-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const ARRAY_GETTER_METHODS = [
'concat',
'entries',
'every',
'fill',
'filter',
'find',
'findIndex',
Expand All @@ -36,6 +35,7 @@ const ARRAY_GETTER_METHODS = [

const ARRAY_SETTER_METHODS = [
'copyWithin',
'fill',
'pop',
'push',
'reverse',
Expand Down

0 comments on commit 15c8ced

Please sign in to comment.