Skip to content

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

fix: do not remove topic ref from note if topic has the note ref

thecodrrd5730477bae4
diff --git a/packages/core/collections/notes.js b/packages/core/collections/notes.js
index 2b25c68b8..0af22e02b 100644
--- a/packages/core/collections/notes.js
+++ b/packages/core/collections/notes.js
@@ -255,11 +255,11 @@ export default class Notes extends Collection {
}
for (let topic of notebook.topics) {
const _topic = nb.topics.topic(topic);
- if (!_topic || _topic.has(note.id)) {
+ if (!_topic || !_topic.has(note.id)) {
deleteItem(notebook.topics, topic);
continue;
}
- if (!_topic.has(note.id)) await _topic.add(note.id);
+ await _topic.add(note.id);
}
}
}