Skip to content

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

fix: object is not extensible error when moving note

thecodrr168e50b0cc29
diff --git a/packages/core/models/topic.js b/packages/core/models/topic.js
index f357f091c..af6925091 100644
--- a/packages/core/models/topic.js
+++ b/packages/core/models/topic.js
@@ -1,5 +1,5 @@
import Topics from "../collections/topics";
-
+import { qclone } from "qclone";
export default class Topic {
/**
*
@@ -30,7 +30,7 @@ export default class Topic {
}
async add(...noteIds) {
- const topic = { ...this._topic };
+ const topic = qclone(this._topic);
for (let noteId of noteIds) {
let note = this._topics._notebooks._notes.note(noteId);
if (this.has(noteId) || !note) continue;