Skip to content

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

fix: undefined notes in groupBy

thecodrr30546998bd9f
diff --git a/packages/core/api/database.js b/packages/core/api/database.js
index 14cbe2d9e..7a4856ac6 100644
--- a/packages/core/api/database.js
+++ b/packages/core/api/database.js
@@ -54,6 +54,7 @@ class Database {
* @param {string} by One from 'abc', 'month', 'year' or 'week'. Leave it empty for default grouping.
*/
groupNotes(by) {
+ let notes = this.getNotes();
switch (by) {
case "abc":
return groupBy(notes, note => note.title[0].toUpperCase());