a bit more brief

This commit is contained in:
Bruno Windels 2021-06-17 10:03:32 +02:00
parent bf84b59e39
commit cbee498d41

View File

@ -140,11 +140,10 @@ export class Timeline {
}; };
this._findAndUpdateRelatedEntry(pee.pendingEvent.relatedTxnId, pee.relatedEventId, updateOrFalse); this._findAndUpdateRelatedEntry(pee.pendingEvent.relatedTxnId, pee.relatedEventId, updateOrFalse);
// also look for a relation target to update with this redaction // also look for a relation target to update with this redaction
const {redactingEntry} = pee; if (pee.redactingEntry) {
if (redactingEntry) {
// redactingEntry might be a PendingEventEntry or an EventEntry, so don't assume pendingEvent // redactingEntry might be a PendingEventEntry or an EventEntry, so don't assume pendingEvent
const relatedTxnId = redactingEntry.pendingEvent?.relatedTxnId; const relatedTxnId = pee.redactingEntry.pendingEvent?.relatedTxnId;
this._findAndUpdateRelatedEntry(relatedTxnId, redactingEntry.relatedEventId, updateOrFalse); this._findAndUpdateRelatedEntry(relatedTxnId, pee.redactingEntry.relatedEventId, updateOrFalse);
} }
} }