mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +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);
|
const tag = this._db[collection].tag(tagId);
|
||||||
if (!tag || tag.noteIds.length <= 0) return [];
|
if (!tag || tag.noteIds.length <= 0) return [];
|
||||||
const array = tag.noteIds.reduce((arr, id) => {
|
const array = tag.noteIds.reduce((arr, id) => {
|
||||||
const item = this._collection.getItem(id);
|
const item = this.note(id);
|
||||||
if (item) arr.push(item);
|
if (item) arr.push(item.data);
|
||||||
return arr;
|
return arr;
|
||||||
}, []);
|
}, []);
|
||||||
return sort(array).desc((note) => note.dateCreated);
|
return sort(array).desc((note) => note.dateCreated);
|
||||||
|
|||||||
Reference in New Issue
Block a user