Use a ternary operator instead of relying on AND semantics in EditHIstoryDialog

Fixes https://github.com/vector-im/riot-web/issues/11334 (probably).

`allEvents` should never have a boolean in it, so given the stack trace and the code this is my best estimate for what the problem could be. I can't reproduce the problem.
pull/21833/head
Travis Ralston 2019-11-08 15:54:48 -07:00
parent 719709250b
commit c4d45e87ea
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ export default class MessageEditHistoryDialog extends React.PureComponent {
nodes.push((
<EditHistoryMessage
key={e.getId()}
previousEdit={!isBaseEvent && allEvents[i + 1]}
previousEdit={!isBaseEvent ? allEvents[i + 1] : null}
isBaseEvent={isBaseEvent}
mxEvent={e}
isTwelveHour={this.state.isTwelveHour}