You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Guard against null rooms in onEventDecrypted
Timeline sets may have a null room, such as with the notification timeline set. Here we check that case when events are decrypted to avoid throw an error. Fixes https://github.com/vector-im/riot-web/issues/9798
This commit is contained in:
@ -556,6 +556,9 @@ const TimelinePanel = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onEventDecrypted: function(ev) {
|
onEventDecrypted: function(ev) {
|
||||||
|
// Can be null for the notification timeline, etc.
|
||||||
|
if (!this.props.timelineSet.room) return;
|
||||||
|
|
||||||
// Need to update as we don't display event tiles for events that
|
// Need to update as we don't display event tiles for events that
|
||||||
// haven't yet been decrypted. The event will have just been updated
|
// haven't yet been decrypted. The event will have just been updated
|
||||||
// in place so we just need to re-render.
|
// in place so we just need to re-render.
|
||||||
|
Reference in New Issue
Block a user