Merge pull request #2559 from urbit/mp/publish/recompare

publish: sort inclusive of accented characters
This commit is contained in:
ixv 2020-03-19 10:54:24 -07:00 committed by GitHub
commit c410263c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,13 +61,9 @@ export class Sidebar extends Component {
notebooks = new Map(
[...notebooks.entries()].sort((a, b) => {
if ((a[1]) && (b[1])) {
if (a[1]["title"].toLowerCase() < b[1]["title"].toLowerCase()) {
return -1;
}
if (a[1]["title"].toLowerCase() > b[1]["title"].toLowerCase()) {
return 1;
}
return 0;
return a[1]["title"].toLowerCase().localeCompare(
b[1]["title"].toLowerCase()
);
}
})
);
@ -76,13 +72,9 @@ export class Sidebar extends Component {
notebooks = new Map(
[...notebooks.entries()].sort((a, b) => {
if ((a[1]) && (b[1])) {
if (a[1]["title"].toLowerCase() > b[1]["title"].toLowerCase()) {
return -1;
}
if (a[1]["title"].toLowerCase() < b[1]["title"].toLowerCase()) {
return 1;
}
return 0;
return b[1]["title"].toLowerCase().localeCompare(
a[1]["title"].toLowerCase()
);
}
})
);