Skip to content

Commit 9dc0837

Browse files
committed
Hopefully fix righhtpanel crash
The right panel wearns many hats, and only one of those hats comes with a room prop, so make sure it's there.
1 parent 6f5f66e commit 9dc0837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/structures/RightPanel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright 2015, 2016 OpenMarket Ltd
33
Copyright 2017 Vector Creations Ltd
44
Copyright 2017, 2018 New Vector Ltd
55
Copyright 2019 Michael Telatynski <[email protected]>
6-
Copyright 2019 The Matrix.org Foundation C.I.C.
6+
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
77
88
Licensed under the Apache License, Version 2.0 (the "License");
99
you may not use this file except in compliance with the License.
@@ -162,7 +162,7 @@ export default class RightPanel extends React.Component {
162162
}
163163

164164
onRoomStateMember(ev, state, member) {
165-
if (member.roomId !== this.props.room.roomId) {
165+
if (!this.props.room || member.roomId !== this.props.room.roomId) {
166166
return;
167167
}
168168
// redraw the badge on the membership list

0 commit comments

Comments
 (0)