Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 3d7358d

Browse files
authored
Merge pull request #5293 from matrix-org/dbkr/fix_rightpanel_crash
Hopefully fix righhtpanel crash
2 parents 6f5f66e + 0c6be6c commit 3d7358d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/structures/RightPanel.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/*
2-
Copyright 2015, 2016 OpenMarket Ltd
3-
Copyright 2017 Vector Creations Ltd
4-
Copyright 2017, 2018 New Vector Ltd
52
Copyright 2019 Michael Telatynski <[email protected]>
6-
Copyright 2019 The Matrix.org Foundation C.I.C.
3+
Copyright 2015 - 2020 The Matrix.org Foundation C.I.C.
74
85
Licensed under the Apache License, Version 2.0 (the "License");
96
you may not use this file except in compliance with the License.
@@ -162,7 +159,7 @@ export default class RightPanel extends React.Component {
162159
}
163160

164161
onRoomStateMember(ev, state, member) {
165-
if (member.roomId !== this.props.room.roomId) {
162+
if (!this.props.room || member.roomId !== this.props.room.roomId) {
166163
return;
167164
}
168165
// redraw the badge on the membership list

0 commit comments

Comments
 (0)