1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

Guard request input

This commit is contained in:
J. Ryan Stinnett
2020-01-29 21:59:30 +00:00
parent 7a5bf8f102
commit eaa48665d2

View File

@@ -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)) {