modify existing by index
This commit is contained in:
@ -150,9 +150,9 @@ export class FlatNoteStore extends HookedNoteStore<Readonly<Array<TaggedNostrEve
|
|||||||
this.#ids.add(a.id);
|
this.#ids.add(a.id);
|
||||||
changes.push(a);
|
changes.push(a);
|
||||||
} else {
|
} else {
|
||||||
const existing = this.#events.find(b => b.id === a.id);
|
const existing = this.#events.findIndex(b => b.id === a.id);
|
||||||
if (existing) {
|
if (existing !== -1) {
|
||||||
existing.relays = appendDedupe(existing.relays, a.relays);
|
this.#events[existing].relays = appendDedupe(this.#events[existing].relays, a.relays);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user