Tinkoff/utils.js

maxBy run its callback once even if array is empty

SkReD opened this issue · 0 comments

SkReD commented

This line https://github.com/TinkoffCreditSystems/utils.js/blob/master/src/array/maxBy.js#L17 is always executed and error may occure if callback not check its input