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

Commit d3f1754

Browse files
committed
Fix crash on opening notification panel
The check for pending edits needed a null guard, since the notification panel uses MessagePanel but is not associated with a specific room. Signed-off-by: Robin Townsend <[email protected]>
1 parent f67ba57 commit d3f1754

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/structures/MessagePanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ export default class MessagePanel extends React.Component {
473473
}
474474

475475
get _roomHasPendingEdit() {
476-
return localStorage.getItem(`mx_edit_room_${this.props.room.roomId}`);
476+
return this.props.room && localStorage.getItem(`mx_edit_room_${this.props.room.roomId}`);
477477
}
478478

479479
_getEventTiles() {

0 commit comments

Comments
 (0)