Merge pull request #1497 from Flamenco/fix_explorer_natural_sort

Use natural sorting for explorer file nodes.
This commit is contained in:
Benoit Schweblin 2019-06-22 22:56:48 +01:00 committed by GitHub
commit f05b089485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ function debounceAction(action, wait) {
}; };
} }
const collator = new Intl.Collator(undefined, { sensitivity: 'base' }); const collator = new Intl.Collator(undefined, { sensitivity: 'base', numeric: true });
const compare = (node1, node2) => collator.compare(node1.item.name, node2.item.name); const compare = (node1, node2) => collator.compare(node1.item.name, node2.item.name);
class Node { class Node {