You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
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.
This commit is contained in:
@@ -116,7 +116,7 @@ export default class MessageEditHistoryDialog extends React.PureComponent {
|
|||||||
nodes.push((
|
nodes.push((
|
||||||
<EditHistoryMessage
|
<EditHistoryMessage
|
||||||
key={e.getId()}
|
key={e.getId()}
|
||||||
previousEdit={!isBaseEvent && allEvents[i + 1]}
|
previousEdit={!isBaseEvent ? allEvents[i + 1] : null}
|
||||||
isBaseEvent={isBaseEvent}
|
isBaseEvent={isBaseEvent}
|
||||||
mxEvent={e}
|
mxEvent={e}
|
||||||
isTwelveHour={this.state.isTwelveHour}
|
isTwelveHour={this.state.isTwelveHour}
|
||||||
|
|||||||
Reference in New Issue
Block a user