File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
packages/vuetify/src/util Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -386,8 +386,6 @@ export function sortItems (
386
386
customSorters ?: Record < string , compareFn >
387
387
) {
388
388
if ( sortBy === null || ! sortBy . length ) return items
389
-
390
- const numericCollator = new Intl . Collator ( locale , { numeric : true , usage : 'sort' } )
391
389
const stringCollator = new Intl . Collator ( locale , { sensitivity : 'accent' , usage : 'sort' } )
392
390
393
391
return items . sort ( ( a , b ) => {
@@ -417,7 +415,7 @@ export function sortItems (
417
415
[ sortA , sortB ] = [ sortA , sortB ] . map ( s => ( s || '' ) . toString ( ) . toLocaleLowerCase ( ) )
418
416
419
417
if ( sortA !== sortB ) {
420
- if ( ! isNaN ( sortA ) && ! isNaN ( sortB ) ) return numericCollator . compare ( sortA , sortB )
418
+ if ( ! isNaN ( sortA ) && ! isNaN ( sortB ) ) return Number ( sortA ) - Number ( sortB )
421
419
return stringCollator . compare ( sortA , sortB )
422
420
}
423
421
}
You can’t perform that action at this time.
0 commit comments