Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: compare first letter of title if sort by === title

thecodrr16b2bb73a9e7
diff --git a/packages/core/utils/grouping.js b/packages/core/utils/grouping.js
index c92339873..8af8d7ff8 100644
--- a/packages/core/utils/grouping.js
+++ b/packages/core/utils/grouping.js
@@ -15,7 +15,12 @@ import {
const getSortSelectors = (options) => [
{ desc: (t) => t.conflicted },
{ desc: (t) => t.pinned },
- { [options.sortDirection]: (item) => item[options.sortBy] },
+ {
+ [options.sortDirection]: (item) => {
+ if (options.sortBy === "title") return item.title[0].toUpperCase();
+ return item[options.sortBy];
+ },
+ },
];
const TIMESTAMPS = {