Skip to content

Commit

Permalink
Merge pull request #1328 from minseok-choe/fix/issue-flat, close #1327
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock authored Feb 6, 2024
2 parents 5119c9a + 96da3a4 commit b36ca26
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core-js/internals/array-reduce.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var createMethod = function (IS_RIGHT) {
var self = IndexedObject(O);
var length = lengthOfArrayLike(O);
aCallable(callbackfn);
if (length === 0 && argumentsLength < 2) throw new $TypeError('Reduce of empty array with no initial value');
var index = IS_RIGHT ? length - 1 : 0;
var i = IS_RIGHT ? -1 : 1;
if (argumentsLength < 2) while (true) {
Expand Down

0 comments on commit b36ca26

Please sign in to comment.