From 82b2da78339b96db9b3afffc8f37cce52d32ede9 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 16 Jun 2017 11:27:47 +0100 Subject: [PATCH] Correctly inspect state when rejecting invite So that we view_next_room if we're looking at the room we're rejecting --- src/components/structures/MatrixChat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index efca22cc85b..ab937c07ac1 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -383,7 +383,7 @@ module.exports = React.createClass({ MatrixClientPeg.get().leave(payload.room_id).done(() => { modal.close(); - if (this.currentRoomId === payload.room_id) { + if (this.state.currentRoomId === payload.room_id) { dis.dispatch({action: 'view_next_room'}); } }, (err) => {