Added sanity checks so decrypt doesn't blow up on null.
This commit is contained in:
parent
91c854f2e1
commit
3f6bf916cd
|
@ -54,7 +54,11 @@ export default class WalletDecrypt extends Component {
|
||||||
return this.state.decryptionChoice === decryptionChoice.name;
|
return this.state.decryptionChoice === decryptionChoice.name;
|
||||||
});
|
});
|
||||||
|
|
||||||
return selectedDecryptionChoice.component;
|
if (!selectedDecryptionChoice) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return <selectedDecryptionChoice.component />;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildDecryptionChoices() {
|
buildDecryptionChoices() {
|
||||||
|
@ -93,7 +97,7 @@ export default class WalletDecrypt extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const DecryptionComponent = this.getDecryptionComponent();
|
const decryptionComponent = this.getDecryptionComponent();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="container">
|
<section className="container">
|
||||||
|
@ -113,7 +117,7 @@ export default class WalletDecrypt extends Component {
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<DecryptionComponent />
|
{decryptionComponent}
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
Loading…
Reference in New Issue