From 0b5691c0032d5145c57925dc40fa6d090eb02da6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 7 May 2020 09:43:14 +0100 Subject: [PATCH] Fix right panel hiding when viewing room member If you clicked on the header button whilst the right panel was showing a room member, it would NPE because there was no refireParams.member. It fires the same phase with no refireParams to toggle the panel visibility (apparently), so detect that case. Fixes https://github.com/vector-im/riot-web/issues/13571 --- src/stores/RightPanelStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/RightPanelStore.js b/src/stores/RightPanelStore.js index 8869d0be42..3a5605ba3f 100644 --- a/src/stores/RightPanelStore.js +++ b/src/stores/RightPanelStore.js @@ -139,7 +139,7 @@ export default class RightPanelStore extends Store { let targetPhase = payload.phase; let refireParams = payload.refireParams; // redirect to EncryptionPanel if there is an ongoing verification request - if (targetPhase === RIGHT_PANEL_PHASES.RoomMemberInfo) { + if (targetPhase === RIGHT_PANEL_PHASES.RoomMemberInfo && payload.refireParams) { const {member} = payload.refireParams; const pendingRequest = pendingVerificationRequestForUser(member); if (pendingRequest) {