Fix right panel soft crashes due to missing room prop (#7923)
This commit is contained in:
parent
36adba101c
commit
7a32a68a0b
6 changed files with 29 additions and 39 deletions
|
@ -106,7 +106,7 @@ export default class ThreadView extends React.Component<IProps, IState> {
|
|||
|
||||
public componentWillUnmount(): void {
|
||||
this.teardownThread();
|
||||
dis.unregister(this.dispatcherRef);
|
||||
if (this.dispatcherRef) dis.unregister(this.dispatcherRef);
|
||||
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
|
||||
room.removeListener(ThreadEvent.New, this.onNewThread);
|
||||
SettingsStore.unwatchSetting(this.layoutWatcherRef);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue