Add null check

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-04-09 08:05:49 +02:00
parent 7f496c7bf5
commit b723092ed2
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

View file

@ -197,7 +197,7 @@ export default class MessageContextMenu extends React.Component {
action: 'forward_event',
event: this.props.mxEvent,
});
this.props.onCloseDialog();
if (this.props.onCloseDialog) this.props.onCloseDialog();
this.closeMenu();
};