fix duplication of search results when conforming to multiple expressions in OR relation, closes #1262

This commit is contained in:
zadam 2020-09-23 22:27:19 +02:00
parent bdebb35f62
commit 1fcb99fa60

View file

@ -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) {