From eaa48665d2af50b4e09c9f81548e3c1d25017c9b Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 29 Jan 2020 21:59:30 +0000 Subject: [PATCH] Guard request input --- src/components/views/right_panel/EncryptionPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/right_panel/EncryptionPanel.js b/src/components/views/right_panel/EncryptionPanel.js index f25a55fa8a..2b3196f4c1 100644 --- a/src/components/views/right_panel/EncryptionPanel.js +++ b/src/components/views/right_panel/EncryptionPanel.js @@ -36,7 +36,7 @@ const EncryptionPanel = ({verificationRequest, member, onClose}) => { setRequest(verificationRequest); }, [verificationRequest]); - const [phase, setPhase] = useState(request.phase); + const [phase, setPhase] = useState(request && request.phase); const changeHandler = useCallback(() => { // handle transitions -> cancelled for mismatches which fire a modal instead of showing a card if (request && request.cancelled && MISMATCHES.includes(request.cancellationCode)) {