This commit is contained in:
Bruno Windels 2019-07-02 18:30:57 +02:00
parent 3fd96008c3
commit daa2250023

View file

@ -206,7 +206,10 @@ export default class MessageEditor extends React.Component {
_cancelPreviousPendingEdit() {
const originalEvent = this.props.editState.getEvent();
const previousEdit = originalEvent.replacingEvent();
if (previousEdit && (previousEdit.status === EventStatus.QUEUED || previousEdit.status === EventStatus.NOT_SENT)) {
if (previousEdit && (
previousEdit.status === EventStatus.QUEUED ||
previousEdit.status === EventStatus.NOT_SENT
)) {
this.context.matrixClient.cancelPendingEvent(previousEdit);
}
}