diff --git a/src/components/views/elements/PersistentApp.js b/src/components/views/elements/PersistentApp.js index eb5f4eab7d..7801076c66 100644 --- a/src/components/views/elements/PersistentApp.js +++ b/src/components/views/elements/PersistentApp.js @@ -57,9 +57,9 @@ export default class PersistentApp extends React.Component { }); }; - _onMyMembership = async (room) => { + _onMyMembership = async (room, membership) => { const persistentWidgetInRoomId = ActiveWidgetStore.getRoomId(this.state.persistentWidgetId); - if (room.getMyMembership() !== "join") { + if (membership !== "join") { // we're not in the room anymore - delete if (room.roomId === persistentWidgetInRoomId) { ActiveWidgetStore.destroyPersistentWidget(this.state.persistentWidgetId);