aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-09-08 03:17:36 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-09-08 03:17:36 +0800
commit69c7fe24b3f14a885bb2ff0bb936d1a35b521de3 (patch)
treef5a22446a040daad53f02cab6c30c6b32aa0b644
parentf0ab4ce52d4383a6b07646b829023ca5217e4e6c (diff)
downloadtangerine-wallet-browser-69c7fe24b3f14a885bb2ff0bb936d1a35b521de3.tar
tangerine-wallet-browser-69c7fe24b3f14a885bb2ff0bb936d1a35b521de3.tar.gz
tangerine-wallet-browser-69c7fe24b3f14a885bb2ff0bb936d1a35b521de3.tar.bz2
tangerine-wallet-browser-69c7fe24b3f14a885bb2ff0bb936d1a35b521de3.tar.lz
tangerine-wallet-browser-69c7fe24b3f14a885bb2ff0bb936d1a35b521de3.tar.xz
tangerine-wallet-browser-69c7fe24b3f14a885bb2ff0bb936d1a35b521de3.tar.zst
tangerine-wallet-browser-69c7fe24b3f14a885bb2ff0bb936d1a35b521de3.zip
Place object property retrieval inside try-catch
-rw-r--r--ui/app/components/account-dropdowns.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js
index a53f3399d..b087a40d4 100644
--- a/ui/app/components/account-dropdowns.js
+++ b/ui/app/components/account-dropdowns.js
@@ -58,7 +58,7 @@ class AccountDropdowns extends Component {
},
},
),
- this.indicateIfLoose(keyring.type),
+ this.indicateIfLoose(keyring),
h('span', {
style: {
marginLeft: '20px',
@@ -75,8 +75,9 @@ class AccountDropdowns extends Component {
})
}
- indicateIfLoose (type) {
+ indicateIfLoose (keyring) {
try { // Sometimes keyrings aren't loaded yet:
+ const type = keyring.type
const isLoose = type !== 'HD Key Tree'
return isLoose ? h('.keyring-label', 'LOOSE') : null
} catch (e) { return }