Handle Ledger Error with Non-U2F Browsers (#882)

This commit is contained in:
William O'Beirne 2018-01-22 15:59:02 -05:00 committed by Daniel Ternyak
parent a58097eeaa
commit 81beab8bc0
1 changed files with 2 additions and 2 deletions

View File

@ -155,11 +155,11 @@ class LedgerNanoSDecryptClass extends Component<Props, State> {
});
})
.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
});
});