Tiny style correction in uniqueId and compareMultiple

This commit is contained in:
Michał Lipiński
2018-05-15 10:53:07 +02:00
parent 0d361bc7b6
commit aff1928482
2 changed files with 6 additions and 6 deletions

View File

@@ -22,9 +22,9 @@ function compareMultiple(object, other, orders) {
const ordersLength = orders.length
while (++index < length) {
var order = index < ordersLength ? orders[index] : null
var cmpFn = (order && typeof order === 'function') ? order: compareAscending
var result = cmpFn(objCriteria[index], othCriteria[index])
const order = index < ordersLength ? orders[index] : null
const cmpFn = (order && typeof order === 'function') ? order: compareAscending
const result = cmpFn(objCriteria[index], othCriteria[index])
if (result) {
if (order && typeof order !== 'function') {
return result * (order == 'desc' ? -1 : 1)