From 9e3b0fdf7cd9be0bc7c0e018185705900b6fd22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 18 Feb 2020 11:46:42 +0100 Subject: [PATCH] EventIndexPanel: Fix the removal of the updateCurrentRoom listeners. The event listeners that update the current room and try to get the current stats from the event index don't seem to be unmounted because this != this confusion. Turning them into arrow methods of the react class fixes this. --- .../views/dialogs/eventindex/ManageEventIndexDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js index 6aab777ee1..fa00477c1a 100644 --- a/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js +++ b/src/async-components/views/dialogs/eventindex/ManageEventIndexDialog.js @@ -46,7 +46,7 @@ export default class ManageEventIndexDialog extends React.Component { }; } - updateCurrentRoom = async (room) => { + updateCurrentRoom = async(room) => { const eventIndex = EventIndexPeg.get(); const stats = await eventIndex.getStats(); let currentRoom = null;