mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
fix(drive): sorting consistent with display
- Filenames are trimmed on display, which causes inconsistencies in sorts when there are trailing spaces in some filenames.
This commit is contained in:
parent
cc675f400d
commit
c8ca3ef80b
@ -3649,10 +3649,10 @@ define([
|
||||
|
||||
var naturalSort = function(a, b) {
|
||||
if (typeof(a) === "string") {
|
||||
a = splitStringToTextAndNumbers(a);
|
||||
a = splitStringToTextAndNumbers(a.trim());
|
||||
}
|
||||
if (typeof(b) === "string") {
|
||||
b = splitStringToTextAndNumbers(b);
|
||||
b = splitStringToTextAndNumbers(b.trim());
|
||||
}
|
||||
|
||||
var comp = lexicographicCompare(a, b);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user