From 3f6bf916cd3e7bb538f32a800e91e36605b3c6e7 Mon Sep 17 00:00:00 2001 From: Daniel Kaspo Date: Tue, 13 Jun 2017 20:00:49 -0400 Subject: [PATCH] Added sanity checks so decrypt doesn't blow up on null. --- common/containers/Tabs/WalletDecrypt/index.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/containers/Tabs/WalletDecrypt/index.jsx b/common/containers/Tabs/WalletDecrypt/index.jsx index 529041f0..88dfbcb1 100644 --- a/common/containers/Tabs/WalletDecrypt/index.jsx +++ b/common/containers/Tabs/WalletDecrypt/index.jsx @@ -54,7 +54,11 @@ export default class WalletDecrypt extends Component { return this.state.decryptionChoice === decryptionChoice.name; }); - return selectedDecryptionChoice.component; + if (!selectedDecryptionChoice) { + return null; + } + + return ; } buildDecryptionChoices() { @@ -93,7 +97,7 @@ export default class WalletDecrypt extends Component { } render() { - const DecryptionComponent = this.getDecryptionComponent(); + const decryptionComponent = this.getDecryptionComponent(); return (
@@ -113,7 +117,7 @@ export default class WalletDecrypt extends Component {
- + {decryptionComponent}