diff --git a/common/components/WalletDecrypt/components/LedgerNano.tsx b/common/components/WalletDecrypt/components/LedgerNano.tsx index 01da246f..af7ef2c4 100644 --- a/common/components/WalletDecrypt/components/LedgerNano.tsx +++ b/common/components/WalletDecrypt/components/LedgerNano.tsx @@ -155,11 +155,11 @@ class LedgerNanoSDecryptClass extends Component { }); }) .catch(err => { - if (err.metaData && err.metaData.code === 5) { + if (err && err.metaData && err.metaData.code === 5) { this.showTip(); } this.setState({ - error: err.metaData ? err.metaData.type : err, + error: err && err.metaData ? err.metaData.type : err.toString(), isLoading: false }); });