Skip to content

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

core: fix note relations not returned

ammarahm-ed0398e99cdf8a
diff --git a/packages/core/collections/relations.js b/packages/core/collections/relations.js
index d4eb36e88..488e25e14 100644
--- a/packages/core/collections/relations.js
+++ b/packages/core/collections/relations.js
@@ -125,12 +125,15 @@ export default class Relations extends Collection {
const items = [];
for (const relation of relations) {
const reference = resolveType === "from" ? relation.from : relation.to;
-
+
let item = null;
switch (reference.type) {
case "reminder":
item = this._db.reminders.reminder(reference.id);
break;
+ case "note":
+ item = this._db.notes.note(reference.id)?.data;
+ break;
}
if (item) items.push(item);
else await this.remove(relation.id);