mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-26 17:16:07 +08:00
Resolve #1109
This commit is contained in:
parent
88279c55e0
commit
32277688af
1 changed files with 7 additions and 0 deletions
|
@ -118,6 +118,13 @@ const
|
|||
|
||||
buildTree = (view, parent, items, path) => {
|
||||
if (items.length) {
|
||||
try {
|
||||
// https://github.com/the-djmaze/snappymail/issues/1109
|
||||
let collator = new Intl.Collator(undefined, {numeric: true, sensitivity: 'base'});
|
||||
items.sort((a, b) => collator.compare(a.name, b.name));
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
items.forEach(item => {
|
||||
if (!item.isFile) {
|
||||
let li = document.createElement('li'),
|
||||
|
|
Loading…
Reference in a new issue