mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-10 06:49:54 -06:00
fix duplication of search results when conforming to multiple expressions in OR relation, closes #1262
This commit is contained in:
@@ -31,8 +31,12 @@ class NoteSet {
|
||||
}
|
||||
|
||||
mergeIn(anotherNoteSet) {
|
||||
this.notes = this.notes.concat(anotherNoteSet.notes);
|
||||
this.noteIdSet = new Set(this.notes.map(note => note.noteId));
|
||||
for (const note of anotherNoteSet.notes) {
|
||||
if (!this.noteIdSet.has(note.noteId)) {
|
||||
this.noteIdSet.add(note.noteId);
|
||||
this.notes.push(note);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
minus(anotherNoteSet) {
|
||||
|
||||
Reference in New Issue
Block a user