Skip to content

Commit 0b8f41b

Browse files
committed
Use localeCompare for alpha sorting
1 parent bcbd046 commit 0b8f41b

2 files changed

Lines changed: 2 additions & 15 deletions

File tree

coffee/sortable.coffee

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ sortable =
9292
alpha:
9393
defaultSortDirection: 'ascending'
9494
compare: (a, b) ->
95-
aa = a[0].toLowerCase()
96-
bb = b[0].toLowerCase()
97-
return 0 if aa is bb
98-
return -1 if aa < bb
99-
1
95+
a[0].localeCompare b[0]
10096

10197
setTimeout sortable.init, 0
10298

js/sortable.js

Lines changed: 1 addition & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)