mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
fix: filter out deleted notes when getting tag notes
This commit is contained in:
@@ -174,8 +174,8 @@ export default class Notes extends Collection {
|
||||
const tag = this._db[collection].tag(tagId);
|
||||
if (!tag || tag.noteIds.length <= 0) return [];
|
||||
const array = tag.noteIds.reduce((arr, id) => {
|
||||
const item = this._collection.getItem(id);
|
||||
if (item) arr.push(item);
|
||||
const item = this.note(id);
|
||||
if (item) arr.push(item.data);
|
||||
return arr;
|
||||
}, []);
|
||||
return sort(array).desc((note) => note.dateCreated);
|
||||
|
||||
Reference in New Issue
Block a user