Add try catch for event tile errors

This commit is contained in:
Jaiwanth 2021-07-23 10:47:40 +05:30
parent 6dd3631a17
commit c81bac1a4c
2 changed files with 34 additions and 26 deletions

View file

@ -46,7 +46,7 @@ export default class CallEvent extends React.Component<IProps, IState> {
super(props);
this.state = {
callState: this.props.callEventGrouper.state,
callState: this.props.callEventGrouper?.state,
silenced: false,
};
}
@ -184,7 +184,7 @@ export default class CallEvent extends React.Component<IProps, IState> {
render() {
const event = this.props.mxEvent;
const sender = event.sender ? event.sender.name : event.getSender();
const isVoice = this.props.callEventGrouper.isVoice;
const isVoice = this.props.callEventGrouper?.isVoice;
const callType = isVoice ? _t("Voice call") : _t("Video call");
const content = this.renderContent(this.state.callState);
const className = classNames({