Skip to content

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

fix: deep clone notebook when adding/updating topic

thecodrr4e50a109835b
diff --git a/packages/core/collections/topics.js b/packages/core/collections/topics.js
index 4526bdd8a..23e64aa40 100644
--- a/packages/core/collections/topics.js
+++ b/packages/core/collections/topics.js
@@ -31,7 +31,7 @@ export default class Topics {
}
async add(...topics) {
- let notebook = { ...this._notebooks.notebook(this._notebookId).data };
+ let notebook = qclone(this._notebooks.notebook(this._notebookId).data);
let allTopics = [...notebook.topics, ...topics];
const unique = this._dedupe(allTopics);