committed by
GitHub
parent
20d2b4f98d
commit
e4f3964f67
4
node_modules/underscore/modules/min.js
generated
vendored
4
node_modules/underscore/modules/min.js
generated
vendored
@ -7,7 +7,7 @@ import each from './each.js';
|
||||
export default function min(obj, iteratee, context) {
|
||||
var result = Infinity, lastComputed = Infinity,
|
||||
value, computed;
|
||||
if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
|
||||
if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
|
||||
obj = isArrayLike(obj) ? obj : values(obj);
|
||||
for (var i = 0, length = obj.length; i < length; i++) {
|
||||
value = obj[i];
|
||||
@ -19,7 +19,7 @@ export default function min(obj, iteratee, context) {
|
||||
iteratee = cb(iteratee, context);
|
||||
each(obj, function(v, index, list) {
|
||||
computed = iteratee(v, index, list);
|
||||
if (computed < lastComputed || computed === Infinity && result === Infinity) {
|
||||
if (computed < lastComputed || (computed === Infinity && result === Infinity)) {
|
||||
result = v;
|
||||
lastComputed = computed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user