feat: publish event when deleting empty note

This commit is contained in:
thecodrr
2020-09-09 11:33:47 +05:00
parent 067bdb7320
commit c565e7480c

View File

@@ -37,7 +37,10 @@ export default class Notes extends Collection {
}; };
if (isNoteEmpty(note)) { if (isNoteEmpty(note)) {
if (oldNote) await this.remove(id); if (oldNote) {
this._db.ev.publish("notes:removeEmptyNote", id);
await this.remove(id);
}
return; return;
} }