Skip to content

Commit f9133a9

Browse files
authored
Update mixin-sorting.js
1 parent 633e99f commit f9133a9

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/components/table/helpers/mixin-sorting.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -147,28 +147,28 @@ export default {
147147
return stableSort(items, (a, b) => {
148148
let result = 0
149149
for (let idx = 0; idx < sortInfo.length && !result; idx++) {
150-
const formatter = sortInfo[idx].formatter
151-
const sortBy = sortInfo[idx].sortBy
152-
const sortDesc = sortInfo[idx].sortDesc
153-
let value = null
154-
if (isFunction(sortCompare)) {
155-
// Call user provided sortCompare routine
156-
value = sortCompare(a, b, sortBy, sortDesc, formatter, sortOptions, sortLocale)
157-
}
158-
if (!isNumber(value)) {
159-
// Fallback to built-in defaultSortCompare if sortCompare
160-
// is not defined or doesn't return a number
161-
value = defaultSortCompare(
162-
a,
163-
b,
164-
sortBy,
165-
sortDesc,
166-
formatter,
167-
sortOptions,
168-
sortLocale,
169-
nullLast
170-
)
171-
}
150+
const formatter = sortInfo[idx].formatter
151+
const sortBy = sortInfo[idx].sortBy
152+
const sortDesc = sortInfo[idx].sortDesc
153+
let value = null
154+
if (isFunction(sortCompare)) {
155+
// Call user provided sortCompare routine
156+
value = sortCompare(a, b, sortBy, sortDesc, formatter, sortOptions, sortLocale)
157+
}
158+
if (!isNumber(value)) {
159+
// Fallback to built-in defaultSortCompare if sortCompare
160+
// is not defined or doesn't return a number
161+
value = defaultSortCompare(
162+
a,
163+
b,
164+
sortBy,
165+
sortDesc,
166+
formatter,
167+
sortOptions,
168+
sortLocale,
169+
nullLast
170+
)
171+
}
172172
// Negate result if sorting if descending order
173173
result = (value || 0) * (sortDesc[idx] ? -1 : 1)
174174
}

0 commit comments

Comments
 (0)