fix: crash when deleting a note in topic

This commit is contained in:
thecodrr
2020-03-03 22:10:13 +05:00
parent 7cda89229e
commit 23b64dc50b

View File

@@ -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);