Skip to content

Commit

Permalink
remove redundant argument reducerProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
bekzod committed Jun 5, 2018
1 parent bee179d commit 8d5d760
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/ember-runtime/lib/mixins/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -932,17 +932,16 @@ const ArrayMixin = Mixin.create(Enumerable, {
@method reduce
@param {Function} callback The callback to execute
@param {Object} initialValue Initial value for the reduce
@param {String} reducerProperty internal use only.
@return {Object} The reduced value.
@public
*/
reduce(callback, initialValue, reducerProperty) {
reduce(callback, initialValue) {
assert('`reduce` expects a function as first argument.', typeof callback === 'function');

let ret = initialValue;

this.forEach(function(item, i) {
ret = callback(ret, item, i, this, reducerProperty);
ret = callback(ret, item, i, this);
}, this);

return ret;
Expand All @@ -960,7 +959,7 @@ const ArrayMixin = Mixin.create(Enumerable, {
@public
*/
invoke(methodName, ...args) {
return this.map((item) => tryInvoke(item, methodName, args));
return this.map(item => tryInvoke(item, methodName, args));
},

/**
Expand Down

0 comments on commit 8d5d760

Please sign in to comment.