mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 14:09:34 +01:00
fix: crash when deleting a note in topic
This commit is contained in:
@@ -57,7 +57,7 @@ export default class Topic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async delete(...noteIds) {
|
async delete(...noteIds) {
|
||||||
const topic = { ...this._topic };
|
const topic = qclone(this._topic);
|
||||||
for (let noteId of noteIds) {
|
for (let noteId of noteIds) {
|
||||||
if (!this.has(noteId)) return this;
|
if (!this.has(noteId)) return this;
|
||||||
let index = topic.notes.findIndex(n => n === noteId);
|
let index = topic.notes.findIndex(n => n === noteId);
|
||||||
|
|||||||
Reference in New Issue
Block a user