Skip to content

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

fix: delta not loading

ammarahm-ed22f0260c3732
diff --git a/packages/core/collections/notes.js b/packages/core/collections/notes.js
index 104b3fa59..9d972476c 100644
--- a/packages/core/collections/notes.js
+++ b/packages/core/collections/notes.js
@@ -53,7 +53,9 @@ export default class Notes {
return;
}
- await this.deltaStorage.write(id + "_delta", note.content.delta);
+ if (!(note.content.delta instanceof String)) {
+ await this.deltaStorage.write(id + "_delta", note.content.delta);
+ }
note = {
id,
@@ -119,7 +121,9 @@ export default class Notes {
if (!query) return [];
let queryFn = v => fuzzysearch(query, v.title + " " + v.content.text);
if (query instanceof Function) queryFn = query;
- return tfun.filter(queryFn)(this.all);
+ let c = tfun.filter(queryFn)(this.all);
+
+ return c;
}
group(by, special = false) {