Fix broken rendering of Room Create when showHiddenEvents enabled
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4ae6507195
commit
910bdf0802
1 changed files with 3 additions and 1 deletions
|
@ -22,6 +22,7 @@ import dis from '../../../dispatcher/dispatcher';
|
|||
import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import {MatrixClientPeg} from '../../../MatrixClientPeg';
|
||||
import ViewSourceEvent from "./ViewSourceEvent";
|
||||
|
||||
export default class RoomCreate extends React.Component {
|
||||
static propTypes = {
|
||||
|
@ -45,7 +46,8 @@ export default class RoomCreate extends React.Component {
|
|||
render() {
|
||||
const predecessor = this.props.mxEvent.getContent()['predecessor'];
|
||||
if (predecessor === undefined) {
|
||||
return <div />; // We should never have been instaniated in this case
|
||||
// We would never have been instantiated in this case except if user has showHiddenEventsInTimeline enabled
|
||||
return <ViewSourceEvent mxEvent={this.props.mxEvent} />;
|
||||
}
|
||||
const prevRoom = MatrixClientPeg.get().getRoom(predecessor['room_id']);
|
||||
const permalinkCreator = new RoomPermalinkCreator(prevRoom, predecessor['room_id']);
|
||||
|
|
Loading…
Reference in a new issue