Skip to content

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

fix: crash when deleting a note in topic

thecodrr23b64dc50be6
diff --git a/packages/core/models/topic.js b/packages/core/models/topic.js
index af6925091..54f89a038 100644
--- a/packages/core/models/topic.js
+++ b/packages/core/models/topic.js
@@ -57,7 +57,7 @@ export default class Topic {
}
async delete(...noteIds) {
- const topic = { ...this._topic };
+ const topic = qclone(this._topic);
for (let noteId of noteIds) {
if (!this.has(noteId)) return this;
let index = topic.notes.findIndex(n => n === noteId);