@@ -147,28 +147,28 @@ export default {
147
147
return stableSort ( items , ( a , b ) => {
148
148
let result = 0
149
149
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
+ }
172
172
// Negate result if sorting if descending order
173
173
result = ( value || 0 ) * ( sortDesc [ idx ] ? - 1 : 1 )
174
174
}
0 commit comments