mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
core: fix sqlite crash on calling delete with empty array
This commit is contained in:
@@ -351,6 +351,8 @@ export class Notes implements ICollection {
|
||||
}
|
||||
|
||||
private async _delete(moveToTrash = true, ...ids: string[]) {
|
||||
if (ids.length <= 0) return;
|
||||
|
||||
if (moveToTrash) {
|
||||
await this.db.trash.add("note", ids);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user